@Test(dependsOnMethods = "update") public void delete() throws Exception { PersonLanguage personLanguage = repo.findById(id); repo.delete(personLanguage); PersonLanguage deletedLanguage = repo.findById(id); Assert.assertNull(deletedLanguage); }
@Test(dependsOnMethods = "read") public void update() throws Exception { PersonLanguage personLanguage = repo.findById(id); PersonLanguage newPersonLanguage = new PersonLanguage.Builder().copy(personLanguage).languageId("Xhosa").build(); repo.update(newPersonLanguage); PersonLanguage updatedPersonLanguage = repo.findById(id); Assert.assertEquals("Xhosa", updatedPersonLanguage.getLanguageId()); }
@Test(dependsOnMethods = "create") public void read() throws Exception { PersonLanguage personLanguage = repo.findById(id); Assert.assertNotNull(personLanguage); }