예제 #1
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);
 }
예제 #2
0
 @Test
 @Ignore
 public void customerCreate() {
   Customer customer = new Customer();
   customer.setUsername("ibrahim");
   customer.setPassword("ibrahim_password");
   customer.setEmail("*****@*****.**");
   customerDAO.addCustomer(customer);
 }
예제 #3
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());
 }