use of io.crnk.core.mock.repository.RelationIdTestRepository in project crnk-framework by crnk-project.
the class ResourceIdControllerTest method prepare.
@Before
public void prepare() {
super.prepare();
ScheduleRepositoryImpl scheduleRepository = new ScheduleRepositoryImpl();
schedule2 = new Schedule();
schedule2.setId(2L);
schedule2.setName("test");
scheduleRepository.save(schedule2);
schedule2Id = new ResourceIdentifier(schedule2.getId().toString(), "schedules");
schedule3 = new Schedule();
schedule3.setId(3L);
schedule3.setName("test");
scheduleRepository.save(schedule3);
schedule3Id = new ResourceIdentifier(schedule3.getId().toString(), "schedules");
repository = new RelationIdTestRepository();
repository.setResourceRegistry(resourceRegistry);
}
use of io.crnk.core.mock.repository.RelationIdTestRepository in project crnk-framework by crnk-project.
the class NestedRelationIdLookupTest method setup.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Before
public void setup() {
super.setup();
scheduleRepository = new ScheduleRepositoryImpl();
schedule = new Schedule();
schedule.setId(3L);
schedule.setName("test");
scheduleRepository.save(schedule);
testRepository = new RelationIdTestRepository();
child = new RelationIdTestResource();
child.setId(1L);
child.setName("child");
testRepository.save(child);
child.setTestSerializeEager(schedule);
}
Aggregations