use of org.apache.cayenne.access.flush.operation.DefaultDbRowOpSorter in project cayenne by apache.
the class DefaultDbRowOpSorterTest method createSorter.
@Before
public void createSorter() {
entitySorter = mock(EntitySorter.class);
EntityResolver entityResolver = mock(EntityResolver.class);
when(entitySorter.getDbEntityComparator()).thenReturn(Comparator.comparing(DbEntity::getName));
when(entitySorter.isReflexive(argThat(ent -> ent.getName().equals("reflexive")))).thenReturn(true);
DataDomain dataDomain = mock(DataDomain.class);
when(dataDomain.getEntitySorter()).thenReturn(entitySorter);
when(dataDomain.getEntityResolver()).thenReturn(entityResolver);
sorter = new DefaultDbRowOpSorter(() -> dataDomain);
}
Aggregations