use of io.crnk.core.engine.properties.PropertiesProvider in project crnk-framework by crnk-project.
the class ClientResourceUpsertTest method setup.
@Before
public void setup() {
boot = new CrnkBoot();
boot.addModule(new TestModule());
boot.boot();
PropertiesProvider propertiesProvider = new NullPropertiesProvider();
ClientProxyFactory proxyFactory = Mockito.mock(ClientProxyFactory.class);
upsert = new ClientResourceUpsert(boot.getResourceRegistry(), propertiesProvider, boot.getModuleRegistry().getTypeParser(), boot.getObjectMapper(), boot.getDocumentMapper(), proxyFactory);
}
use of io.crnk.core.engine.properties.PropertiesProvider in project crnk-framework by crnk-project.
the class ResourceRepositoryBaseTest method setup.
@Before
public void setup() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceDiscovery(new ReflectionsServiceDiscovery(MockConstants.TEST_MODELS_PACKAGE));
boot.setPropertiesProvider(new PropertiesProvider() {
@Override
public String getProperty(String key) {
if (key.equals(CrnkProperties.RETURN_404_ON_NULL)) {
return "true";
}
return null;
}
});
boot.boot();
repository = new TestRepository();
repository.setResourceRegistry(boot.getResourceRegistry());
}
Aggregations