Search in sources :

Example 1 with ProjectToTaskRepository

use of io.crnk.core.mock.repository.ProjectToTaskRepository in project crnk-framework by crnk-project.

the class ResourceFieldContributorTest method setup.

@Before
public void setup() {
    MockRepositoryUtil.clear();
    contributedRepository = Mockito.spy(new ContributorRelationshipRepository());
    SimpleModule testModule = new SimpleModule("test");
    testModule.addRepository(new TaskRepository());
    testModule.addRepository(new ProjectRepository());
    testModule.addRepository(new ProjectToTaskRepository());
    testModule.addRepository(contributedRepository);
    boot = new CrnkBoot();
    boot.setServiceDiscovery(new TestServiceDiscovery());
    boot.addModule(testModule);
    boot.boot();
}
Also used : ProjectRepository(io.crnk.core.mock.repository.ProjectRepository) CrnkBoot(io.crnk.core.boot.CrnkBoot) ProjectToTaskRepository(io.crnk.core.mock.repository.ProjectToTaskRepository) TestServiceDiscovery(io.crnk.core.module.discovery.TestServiceDiscovery) ProjectToTaskRepository(io.crnk.core.mock.repository.ProjectToTaskRepository) TaskRepository(io.crnk.core.mock.repository.TaskRepository) SimpleModule(io.crnk.core.module.SimpleModule) Before(org.junit.Before)

Aggregations

CrnkBoot (io.crnk.core.boot.CrnkBoot)1 ProjectRepository (io.crnk.core.mock.repository.ProjectRepository)1 ProjectToTaskRepository (io.crnk.core.mock.repository.ProjectToTaskRepository)1 TaskRepository (io.crnk.core.mock.repository.TaskRepository)1 SimpleModule (io.crnk.core.module.SimpleModule)1 TestServiceDiscovery (io.crnk.core.module.discovery.TestServiceDiscovery)1 Before (org.junit.Before)1