Beispiel #1
0
 @Test
 @Ignore
 public void updateCustomer() {
   Customer customer = customerDAO.findCustomer("ameer");
   System.out.println("email address before:" + customer.getEmail());
   customer = new Customer();
   customer.setUsername("ameer");
   customer.setEmail("*****@*****.**");
   customerDAO.updateCustomer(customer);
   customer = customerDAO.findCustomer("ameer");
   assertEquals("*****@*****.**", customer.getEmail());
 }
Beispiel #2
0
 /**
  * This method tests a duplicate entry and is expected to throw Springs
  * DataIntegrityViolationException
  */
 @Test(expected = DataIntegrityViolationException.class)
 @Ignore
 public void duplicateEntry() {
   Customer customer = new Customer();
   customer.setUsername("ameer");
   customer.setPassword("ameer_password");
   customer.setEmail("*****@*****.**");
   customerDAO.addCustomer(customer);
 }
Beispiel #3
0
 @Test
 @Ignore
 public void customerCreate() {
   Customer customer = new Customer();
   customer.setUsername("ibrahim");
   customer.setPassword("ibrahim_password");
   customer.setEmail("*****@*****.**");
   customerDAO.addCustomer(customer);
 }
Beispiel #4
0
 @Test
 public void findAll() {
   List<Customer> customers = customerDAO.findAllCustomers();
   for (int i = 0; i < customers.size(); i++) System.out.println(customers.get(i).getUsername());
 }
Beispiel #5
0
 @Test
 @Ignore
 public void findCustomer() {
   Customer customer = (Customer) customerDAO.findCustomer("ameer");
 }
Beispiel #6
0
 /** Deletes existing entity */
 @Test
 @Transactional
 @Ignore
 public void deleteEnttry() {
   customerDAO.deleteCustomer("ameer");
 }
Beispiel #7
0
 /** This method checks for an entity not located in the database and trys to delete it. */
 @Test(expected = ObjectRetrievalFailureException.class)
 @Ignore
 public void deleteFakeEntry() {
   customerDAO.deleteCustomer("steve");
 }