@Test public void findCartForNullCustomerId() { assert orderService.findCartForCustomer(new CustomerImpl()) == null; }
@Override public String getMainEntityName() { if (!StringUtils.isEmpty(getFirstName()) && !StringUtils.isEmpty(getLastName())) { return getFirstName() + " " + getLastName(); } if (!StringUtils.isEmpty(getUsername())) { return getUsername(); } return String.valueOf(getId()); }
@DataProvider(name = "setupCustomers") public static Object[][] createCustomers() { Customer customer1 = new CustomerImpl(); customer1.setPassword("customer1Password"); customer1.setUsername("customer1"); Customer customer2 = new CustomerImpl(); customer2.setPassword("customer2Password"); customer2.setUsername("customer2"); return new Object[][] { new Object[] { customer1 }, new Object[] { customer2 } }; } }
@DataProvider(name = "setupCustomerControllerData") public static Object[][] createCustomer() { Customer customer = new CustomerImpl(); customer.setEmailAddress("testCase@test.com"); customer.setFirstName("TestFirstName"); customer.setLastName("TestLastName"); customer.setUsername("TestCase"); ChallengeQuestion question = new ChallengeQuestionImpl(); question.setId(1L); customer.setChallengeQuestion(question); customer.setChallengeAnswer("Challenge CandidateItemOfferAnswer"); RegisterCustomerForm registerCustomer = new RegisterCustomerForm(); registerCustomer.setCustomer(customer); registerCustomer.setPassword("TestPassword"); registerCustomer.setPasswordConfirm("TestPassword"); return new Object[][] { new Object[] { registerCustomer } }; } }
Customer customer = new CustomerImpl(); customer.setEmailAddress("test@test.com"); customer.setFirstName("John");
Customer customer = new CustomerImpl(); customer.setEmailAddress("test@test.com"); customer.setFirstName("John");
@Primary @Bean public Customer newMethodName() { return new CustomerImpl() }
@Bean(name=customerImpl) public Customer customerImpl() { return new CustomerImpl() }
@Bean public ICustomer customer() { return new CustomerImpl() }