Esempio n. 1
0
 @Test
 public void findEmployeeBySsn() {
   Assert.assertNotNull(employeeDao.findEmployeeBySsn("11111"));
   Assert.assertNull(employeeDao.findEmployeeBySsn("14545"));
 }
Esempio n. 2
0
 @Test
 public void findAllEmployees() {
   Assert.assertEquals(employeeDao.findAllEmployees().size(), 2);
 }
Esempio n. 3
0
 @Test
 public void deleteEmployeeByInvalidSsn() {
   employeeDao.deleteEmployeeBySsn("23423");
   Assert.assertEquals(employeeDao.findAllEmployees().size(), 2);
 }
Esempio n. 4
0
 @Test
 public void deleteEmployeeBySsn() {
   employeeDao.deleteEmployeeBySsn("11111");
   Assert.assertEquals(employeeDao.findAllEmployees().size(), 1);
 }
Esempio n. 5
0
 @Test
 public void saveEmployee() {
   employeeDao.saveEmployee(getSampleEmployee());
   Assert.assertEquals(employeeDao.findAllEmployees().size(), 3);
 }
Esempio n. 6
0
 @Test
 public void findById() {
   Assert.assertNotNull(employeeDao.findById(1));
   Assert.assertNull(employeeDao.findById(3));
 }