@Test public void testUpdateMissed() throws Exception { Resume resume = new Resume("fullName_U1", "location_U1"); thrown.expect(WebAppException.class); thrown.expectMessage(ExceptionType.NOT_FOUND.getMessage()); storage.update(resume); }
@Test public void testDeleteNotFound() throws Exception { thrown.expect(WebAppException.class); thrown.expectMessage(ExceptionType.NOT_FOUND.getMessage()); thrown.expect(new ExceptionTypeMatcher(ExceptionType.NOT_FOUND)); storage.load("dummy"); }
@Test public void testDelete() throws Exception { storage.delete(ResumeTestData.R1.getUuid()); assertSize(2); assertGet(ResumeTestData.R2); assertGet(ResumeTestData.R3); thrown.expect(WebAppException.class); thrown.expectMessage(ExceptionType.NOT_FOUND.getMessage()); assertGet(ResumeTestData.R1); }