Advertisement
JeffGrigg

Untitled

Nov 11th, 2020
1,669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.49 KB | None | 0 0
  1. import junit.framework.TestCase;
  2.  
  3. public class MutationTest extends TestCase {
  4.     public static int f(final int value) {
  5.         return (value <= 10) ? 10 : value;
  6.     }
  7.     public void test() {
  8.         assertEquals(10, f(0));
  9.         assertEquals(10, f(1));
  10.         assertEquals(10, f(9));
  11.         //
  12.         assertEquals(10, f(10));
  13.         //
  14.         assertEquals(11, f(11));
  15.         assertEquals(12, f(12));
  16.         assertEquals(20, f(20));
  17.         assertEquals(99, f(99));
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement