コード例 #1
0
 @Test
 @Transactional
 public void testFindCivilityById() {
   assertEquals(civilityDao.findCivilityById(1l).getName(), "projecthandler.civility.mister");
   assertEquals(civilityDao.findCivilityById(2l).getName(), "projecthandler.civility.mrs");
   assertEquals(civilityDao.findCivilityById(3l).getName(), "projecthandler.civility.miss");
 }
コード例 #2
0
 @Test
 @Transactional
 public void testGetAllCivilities() {
   List<Civility> civilities = civilityDao.getAllCivilities();
   assertEquals(civilities.get(0).getId(), new Long(1));
   assertEquals(civilities.get(0).getName(), "projecthandler.civility.mister");
   assertEquals(civilities.get(1).getId(), new Long(2));
   assertEquals(civilities.get(1).getName(), "projecthandler.civility.mrs");
   assertEquals(civilities.get(2).getId(), new Long(3));
   assertEquals(civilities.get(2).getName(), "projecthandler.civility.miss");
 }