asserting it right
assertTrue(integer == 4);
Why would you write this?
Much better is to do:
assertEquals("Meaning of this number", 4, integer);
That way you didn’t wrote much more than before, but when this test fails people know what failed.
assertTrue(integer == 4);
Why would you write this?
Much better is to do:
assertEquals("Meaning of this number", 4, integer);
That way you didn’t wrote much more than before, but when this test fails people know what failed.