use of org.broadleafcommerce.profile.core.domain.ChallengeQuestion in project BroadleafCommerce by BroadleafCommerce.
the class RegisterCustomerDataProvider method createCustomer.
@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 } };
}
use of org.broadleafcommerce.profile.core.domain.ChallengeQuestion in project BroadleafCommerce by BroadleafCommerce.
the class ChallengeQuestionDaoImpl method readChallengeQuestionById.
@Override
public ChallengeQuestion readChallengeQuestionById(long challengeQuestionId) {
Query query = em.createNamedQuery("BC_READ_CHALLENGE_QUESTION_BY_ID");
query.setParameter("question_id", challengeQuestionId);
List<ChallengeQuestion> challengeQuestions = query.getResultList();
return challengeQuestions == null || challengeQuestions.isEmpty() ? null : challengeQuestions.get(0);
}
Aggregations