@Test public void should_throw_exception_if_Objects_have_not_the_same_properties() { thrown.expect(IntrospectionError.class); assertThat(fieldByFieldComparator.compare(new JarJar("Yoda"), 2)).isNotZero(); }
@Test public void should_return_are_not_equal_if_second_Object_is_null_and_first_is_not() { assertThat(fieldByFieldComparator.compare(new JarJar("Yoda"), null)).isNotZero(); }
@Test public void should_return_true_if_Objects_are_equal() { assertThat(fieldByFieldComparator.compare(new JarJar("Yoda"), new JarJar("Yoda"))).isZero(); }
@Test public void should_return_false_if_Objects_are_not_equal() { assertThat(fieldByFieldComparator.compare(new JarJar("Yoda"), new JarJar("HanSolo"))) .isNotZero(); }
@Test public void should_return_true_if_both_Objects_are_null() { assertThat(fieldByFieldComparator.compare(null, null)).isZero(); }