use of io.crnk.test.mock.models.UnknownResource in project crnk-framework by crnk-project.
the class ExceptionTest method testUnknownRepository.
@Test
public void testUnknownRepository() {
UnknownResource task = new UnknownResource();
task.setId("test");
ResourceRepositoryV2<UnknownResource, String> taskRepo = client.getRepositoryForType(UnknownResource.class);
try {
taskRepo.create(task);
Assert.fail();
} catch (ResourceNotFoundException e) {
// ok
}
}
Aggregations