use of io.crnk.test.mock.models.TaskSubType in project crnk-framework by crnk-project.
the class InheritanceClientTest method setup.
@Before
public void setup() {
super.setup();
taskRepo = client.getRepositoryForType(Task.class);
projectRepo = client.getRepositoryForType(Project.class);
relRepo = client.getRepositoryForType(Project.class, Task.class);
Task baseTask = new Task();
baseTask.setId(Long.valueOf(1));
baseTask.setName("baseTask");
taskRepo.create(baseTask);
TaskSubType taskSubType = new TaskSubType();
taskSubType.setId(Long.valueOf(2));
taskSubType.setName("taskSubType");
taskSubType.setSubTypeValue(13);
taskRepo.create(taskSubType);
Project project = new Project();
project.setId(1L);
project.setName("project0");
project.setTasks(Arrays.asList(baseTask, taskSubType));
projectRepo.create(project);
relRepo.addRelations(project, Arrays.asList(baseTask.getId(), taskSubType.getId()), "tasks");
}
Aggregations