看起来很酷
assertThat(yoda).is(jedi);
直到你不知道什么是yoda
and jedi
。但是假设
yoda instanceof Person
在哪里
interface Person {
boolean isJedi();
}
那么如何实际检查isJedi
呢AssertJ
?
按照惯例JUnit
,我会写
assertTrue( yoda.isJedi() );
但在什么AssertJ
?
看起来很酷
assertThat(yoda).is(jedi);
直到你不知道什么是yoda
and jedi
。但是假设
yoda instanceof Person
在哪里
interface Person {
boolean isJedi();
}
那么如何实际检查isJedi
呢AssertJ
?
按照惯例JUnit
,我会写
assertTrue( yoda.isJedi() );
但在什么AssertJ
?