It looks very cool
assertThat(yoda).is(jedi);
until you don't know what is yoda
and jedi
. But suppose
yoda instanceof Person
where
interface Person {
boolean isJedi();
}
Then how actually check isJedi
with AssertJ
?
In conventional JUnit
I would write
assertTrue( yoda.isJedi() );
but what in AssertJ
?
assertThat(yoda.isJedi()).isTrue()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With