assertEquals(-1, ascComparator.compare(new PropertyModelObject("ben1"), new PropertyModelObject("ben2")));
}
@Test
public void shouldReturnPositiveIfObject1IsConsideredLessThanObject2AndSortOrderIsDescending() {
PropertyModelObjectComparator ascComparator = new PropertyModelObjectComparator(false, "name");
assertEquals(1, ascComparator.compare(new PropertyModelObject("ben1"), new PropertyModelObject("ben2")));
}
@Test
public void shouldReturnPositiveIfObject1IsConsideredMoreThanObject2AndSortOrderIsAscending() {
PropertyModelObjectComparator ascComparator = new PropertyModelObjectComparator(true, "name");
assertEquals(1, ascComparator.compare(new PropertyModelObject("ben2"), new PropertyModelObject("ben1")));