You can test objects assertEquals(a,b)
and assertTrue(a.equals(b))
or assertTrue(a==b)
(for primitives). In this case of course assertEquals(a,b)
is the only possible variant. It is null safe and more informative in case of test fault (you get exact fault not true or false).
I have a next question.
What about situation when we have only Boolean value to test?
assertEquals(true, a)
and assertTrue(a)
What the difference can be?