use of io.crnk.jpa.query.querydsl.QuerydslRepositoryFilterBase in project crnk-framework by crnk-project.
the class QuerydslRepositoryFilterTest method translationInterceptor.
@SuppressWarnings("unchecked")
@Test
public void translationInterceptor() {
JpaEntityRepository<TestEntity, Long> repo = new JpaEntityRepository<>(module, JpaRepositoryConfig.create(TestEntity.class));
QuerydslRepositoryFilterBase filter = Mockito.spy(new QuerydslRepositoryFilterBase());
module.addFilter(filter);
QuerySpec querySpec = new QuerySpec(TestEntity.class);
repo.findAll(querySpec);
Mockito.verify(filter, Mockito.times(1)).filterQueryTranslation(Mockito.eq(repo), Mockito.eq(querySpec), Mockito.any(QuerydslTranslationContext.class));
}
Aggregations