use of io.crnk.core.repository.decorate.RelationshipRepositoryDecoratorBase in project crnk-framework by crnk-project.
the class DecoratorTest method testRelationshipRegistryAwareDecoration.
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void testRelationshipRegistryAwareDecoration() {
RegistryAwareRelationshipRepository repository = Mockito.mock(RegistryAwareRelationshipRepository.class);
RelationshipRepositoryDecoratorBase<Schedule, Long, Task, Long> decorator = new RelationshipRepositoryDecoratorBase() {
};
decorator.setDecoratedObject(repository);
ResourceRegistry resourceRegistry = Mockito.mock(ResourceRegistry.class);
decorator.setResourceRegistry(resourceRegistry);
Mockito.verify(repository, Mockito.times(1)).setResourceRegistry(Mockito.eq(resourceRegistry));
}
Aggregations