use of io.crnk.test.mock.TestException in project crnk-framework by crnk-project.
the class ExceptionTest method repoWithProxyAndInterface.
@Test
public void repoWithProxyAndInterface() {
ScheduleRepository repo = client.getRepositoryForInterface(ScheduleRepository.class);
Schedule schedule = new Schedule();
schedule.setId(10000L);
schedule.setName("test");
try {
repo.create(schedule);
Assert.fail();
} catch (TestException e) {
Assert.assertEquals("msg", e.getMessage());
}
}
use of io.crnk.test.mock.TestException in project crnk-framework by crnk-project.
the class ExceptionTest method genericRepo.
@Test
public void genericRepo() {
Task task = new Task();
task.setId(10000L);
task.setName("test");
try {
taskRepo.create(task);
Assert.fail();
} catch (TestException e) {
Assert.assertEquals("msg", e.getMessage());
}
}
Aggregations