コード例 #1
0
 //    @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);
 }
コード例 #2
0
 //    @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");
 }
コード例 #3
0
 //    @Test(dependsOnMethods = "testCreate")
 public void testRead() {
   repository = ctx.getBean(LanguageProficiencyRepository.class);
   LanguageProficiency name = repository.findOne(id);
   Assert.assertEquals(name.getProficiency(), "Proficiency1");
 }
コード例 #4
0
 //    @Test
 public void testCreate() {
   repository = ctx.getBean(LanguageProficiencyRepository.class);
   LanguageProficiency name = new LanguageProficiency.Builder("Proficiency1").build();
   repository.save(name);
   id = name.getId();
 }