// @Test(dependsOnMethods = {"testUpdate"}) public void testDelete() { repository = ctx.getBean(LanguageProficiencyRepository.class); LanguageProficiency name = repository.findOne(id); repository.delete(name); LanguageProficiency deletedName = repository.findOne(id); Assert.assertNull(deletedName); }
// @Test(dependsOnMethods = {"testRead"}) public void testUpdate() { repository = ctx.getBean(LanguageProficiencyRepository.class); LanguageProficiency name = repository.findOne(id); LanguageProficiency newName = new LanguageProficiency.Builder("Proficiency2").id(name.getId()).build(); repository.save(newName); LanguageProficiency upName = repository.findOne(id); Assert.assertEquals(upName.getProficiency(), "Proficiency2"); }
// @Test(dependsOnMethods = "testCreate") public void testRead() { repository = ctx.getBean(LanguageProficiencyRepository.class); LanguageProficiency name = repository.findOne(id); Assert.assertEquals(name.getProficiency(), "Proficiency1"); }
// @Test public void testCreate() { repository = ctx.getBean(LanguageProficiencyRepository.class); LanguageProficiency name = new LanguageProficiency.Builder("Proficiency1").build(); repository.save(name); id = name.getId(); }