I need to write a JUnit test for an algorithm I wrote that outputs a random integer between two known values.
I need a JUnit test (I.e. an assertEquals like test) that asserts that the out-putted value is between these two integers (or not).
I.e. I have the values 5 and 10, the output would be a random value between 5 and 10. If the test is positive the number was between the two values, otherwise it was not.
1 Answer