@Test public void testDeleteSeveral() { List<Long> expected = Arrays.asList(1L, 2L, 3L); List<PersonInfo> actual = personInfoService.delete(expected); assertNotNull(actual); assertFalse(actual.isEmpty()); }
@Test public void testLoadById() { long expected = 1; PersonInfo pi = personInfoService.load(expected); assertNotNull(pi); assertTrue((long) expected == (long) pi.getId()); }
@Test public void testAddOrSave() { PersonInfo expected = getFakePersonInfo(); assertNull(expected.getId()); PersonInfo actual = personInfoService.addOrSave(expected); assertNotNull(actual.getId()); assertSame(expected, actual); }
@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()); }
@Test public void testLoadAll() { List<PersonInfo> all = personInfoService.loadAll(); assertNotNull(all); assertFalse(all.isEmpty()); }