コード例 #1
0
 @Test
 public void testDeleteSeveral() {
   List<Long> expected = Arrays.asList(1L, 2L, 3L);
   List<PersonInfo> actual = personInfoService.delete(expected);
   assertNotNull(actual);
   assertFalse(actual.isEmpty());
 }
コード例 #2
0
 @Test
 public void testLoadById() {
   long expected = 1;
   PersonInfo pi = personInfoService.load(expected);
   assertNotNull(pi);
   assertTrue((long) expected == (long) pi.getId());
 }
コード例 #3
0
 @Test
 public void testAddOrSave() {
   PersonInfo expected = getFakePersonInfo();
   assertNull(expected.getId());
   PersonInfo actual = personInfoService.addOrSave(expected);
   assertNotNull(actual.getId());
   assertSame(expected, actual);
 }
コード例 #4
0
 @Test
 public void testLoadExact() {
   PersonInfo expected = getFakePersonInfo();
   assertNull(expected.getId());
   PersonInfo actual = personInfoService.load(expected);
   assertNotNull(actual);
   assertEquals(expected.getFirstName(), actual.getFirstName());
   assertEquals(expected.getLastName(), actual.getLastName());
   assertEquals(expected.getAge(), actual.getAge());
   assertEquals(expected.getBirthDate(), actual.getBirthDate());
   assertEquals(expected.getGender(), actual.getGender());
 }
コード例 #5
0
 @Test
 public void testLoadAll() {
   List<PersonInfo> all = personInfoService.loadAll();
   assertNotNull(all);
   assertFalse(all.isEmpty());
 }