@Test public void should_fail_if_match_is_not_successful() { BeanPropertyMatcher matcher = new BeanPropertyMatcher("firstName", is("Bill")); Map<String, String> person = mappedPerson("Graeam", "Garden"); assertThat(matcher.matches(person)).isFalse(); }
@Test public void should_match_field_by_name() { BeanPropertyMatcher matcher = new BeanPropertyMatcher("firstName", is("Bill")); Map<String, String> person = mappedPerson("Bill", "Oddie"); assertThat(matcher.matches(person)).isTrue(); }