@Test public void should_return_false_if_all_but_ignored_fields_are_not_equal() { assertThat( ignoringFieldsComparator.compare( new DarthVader("I like you", "I'll kill you"), new DarthVader("I'll kill you", "I'll kill you"))) .isNotZero(); }
@Test public void should_return_false_if_Objects_do_not_have_the_same_properties() { assertThat(ignoringFieldsComparator.compare(new DarthVader("I like you", "I'll kill you"), 2)) .isNotZero(); }
@Test public void should_return_are_not_equal_if_second_Object_is_null_and_first_is_not() { assertThat( ignoringFieldsComparator.compare(new DarthVader("I like you", "I'll kill you"), null)) .isNotZero(); }
@Test public void should_return_true_if_both_Objects_are_null() { assertThat(ignoringFieldsComparator.compare(null, null)).isZero(); }