use of io.crnk.core.engine.filter.ResourceModificationFilterBase in project crnk-framework by crnk-project.
the class BaseControllerTest method prepare.
@Before
public void prepare() {
modificationFilter = Mockito.spy(new ResourceModificationFilterBase());
modificationFilters = Arrays.asList(modificationFilter);
CrnkBoot boot = new CrnkBoot();
boot.setServiceUrlProvider(new ConstantServiceUrlProvider(ResourceRegistryTest.TEST_MODELS_URL));
boot.setServiceDiscovery(new ReflectionsServiceDiscovery(MockConstants.TEST_MODELS_PACKAGE));
boot.boot();
objectMapper = boot.getObjectMapper();
resourceRegistry = boot.getResourceRegistry();
moduleRegistry = boot.getModuleRegistry();
pathBuilder = new PathBuilder(resourceRegistry);
typeParser = moduleRegistry.getTypeParser();
documentMapper = boot.getDocumentMapper();
MockRepositoryUtil.clear();
emptyTaskQuery = new QuerySpecAdapter(new QuerySpec(Task.class), resourceRegistry);
emptyProjectQuery = new QuerySpecAdapter(new QuerySpec(Project.class), resourceRegistry);
emptyUserQuery = new QuerySpecAdapter(new QuerySpec(User.class), resourceRegistry);
emptyComplexPojoQuery = new QuerySpecAdapter(new QuerySpec(ComplexPojo.class), resourceRegistry);
emptyMemorandumQuery = new QuerySpecAdapter(new QuerySpec(Memorandum.class), resourceRegistry);
}
Aggregations