use of org.mifos.application.questionnaire.struts.QuestionnaireFlowAdapter in project head by mifos.
the class LoanAccountActionTest method setUp.
@Before
public void setUp() throws PageExpiredException {
loanAccountAction = new LoanAccountAction(null, loanBusinessService, null, loanPrdBusinessService, null, null, null, null) {
@SuppressWarnings("unused")
@Override
LoanBO getLoan(Integer loanId) {
return loanBO;
}
@Override
protected UserContext getUserContext(@SuppressWarnings("unused") HttpServletRequest request) {
return userContext;
}
@Override
QuestionnaireFlowAdapter getCreateLoanQuestionnaire() {
return createLoanQuestionnaire;
}
};
loanAccountAction.setLoanServiceFacade(loanServiceFacade);
loanAccountAction.setLoanAccountServiceFacade(loanAccountServiceFacade);
loanAccountAction.setCustomerDao(customerDao);
when(request.getAttribute(Constants.CURRENTFLOWKEY)).thenReturn(FLOW_KEY);
when(request.getSession()).thenReturn(session);
when(session.getAttribute(Constants.FLOWMANAGER)).thenReturn(flowManager);
flow = new Flow();
when(flowManager.getFlowWithValidation(FLOW_KEY)).thenReturn(flow);
when(userContext.getLocaleId()).thenReturn(localeId);
when(userContext.getPreferredLocale()).thenReturn(Locale.US);
}
Aggregations