Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.junit.Test;
- import static org.junit.Assert.*;
- public class IntRangeTest {
- public static boolean decideWithIfOneTwoOrThree(int number) {
- return (number >= 1 && number <= 3);
- }
- @Test
- public void test() {
- assertFalse(decideWithIfOneTwoOrThree(Integer.MIN_VALUE));
- assertFalse(decideWithIfOneTwoOrThree(-100));
- assertFalse(decideWithIfOneTwoOrThree(-10));
- assertFalse(decideWithIfOneTwoOrThree(-1));
- assertFalse(decideWithIfOneTwoOrThree(0));
- assertTrue(decideWithIfOneTwoOrThree(1));
- assertTrue(decideWithIfOneTwoOrThree(2));
- assertTrue(decideWithIfOneTwoOrThree(3));
- assertFalse(decideWithIfOneTwoOrThree(4));
- assertFalse(decideWithIfOneTwoOrThree(5));
- assertFalse(decideWithIfOneTwoOrThree(10));
- assertFalse(decideWithIfOneTwoOrThree(100));
- assertFalse(decideWithIfOneTwoOrThree(Integer.MAX_VALUE));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement