use of io.crnk.test.mock.TestModule in project crnk-framework by crnk-project.
the class ActivitiTestBase method setup.
@Before
public void setup() {
processEngine = ProcessEngines.getDefaultProcessEngine();
processEngine.getRepositoryService().createDeployment().addClasspathResource("approval.bpmn20.xml").deploy();
boot = new CrnkBoot();
boot.addModule(new TestModule());
boot.addModule(createActivitiModule());
boot.boot();
taskRepository = (TaskResourceRepository<ApproveTask>) boot.getResourceRegistry().getEntry(ApproveTask.class).getResourceRepository().getResourceRepository();
}
use of io.crnk.test.mock.TestModule in project crnk-framework by crnk-project.
the class HomeResourceFilteringTest method setup.
@Before
public void setup() {
filter = Mockito.mock(ResourceFilter.class);
SimpleModule filterModule = new SimpleModule("filter");
filterModule.addResourceFilter(filter);
this.module = Mockito.spy(HomeModule.create());
boot = new CrnkBoot();
boot.addModule(module);
boot.addModule(new TestModule());
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.addModule(filterModule);
boot.boot();
}
use of io.crnk.test.mock.TestModule in project crnk-framework by crnk-project.
the class HomeModuleTest method setup.
@Before
public void setup() {
this.module = Mockito.spy(HomeModule.create(HomeFormat.JSON_HOME));
boot = new CrnkBoot();
boot.addModule(module);
boot.addModule(new TestModule());
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.boot();
}
use of io.crnk.test.mock.TestModule in project crnk-framework by crnk-project.
the class ClientDocumentMapperTest method setup.
@Before
public void setup() {
boot = new CrnkBoot();
boot.addModule(new TestModule());
boot.boot();
NullPropertiesProvider properties = new NullPropertiesProvider();
documentMapper = new ClientDocumentMapper(boot.getModuleRegistry(), boot.getObjectMapper(), properties);
}
use of io.crnk.test.mock.TestModule 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);
}
Aggregations