use of org.kuali.kfs.coa.businessobject.AccountDelegateModel in project cu-kfs by CU-CommunityApps.
the class CuOrganizationRoutingModelNameLookupableHelperServiceImplTest method testGetReturnUrl.
public void testGetReturnUrl() {
BusinessObjectRestrictionsBase businessObjectRestrictions = new BusinessObjectRestrictionsBase();
Map<String, String> fieldConversions = new HashMap<String, String>();
fieldConversions.put("organizationCode", "modelOrganizationCode");
fieldConversions.put("chartOfAccountsCode", "modelChartOfAccountsCode");
fieldConversions.put("accountDelegateModelName", "modelName");
lookupableHelperServiceImpl.setFieldConversions(fieldConversions);
lookupableHelperServiceImpl.setBusinessObjectClass(AccountDelegateModel.class);
LookupForm lookupForm = new LookupForm();
lookupForm.setFieldConversions(fieldConversions);
lookupForm.setLookupableImplServiceName("organizationRoutingModelLookupable");
AccountDelegateModel accountDelegateModel = new AccountDelegateModel();
accountDelegateModel.setAccountDelegateModelName("Stuff");
accountDelegateModel.setChartOfAccountsCode("IT");
accountDelegateModel.setOrganizationCode("1000");
List<String> returnKeys = new ArrayList<String>();
returnKeys.add("chartOfAccountsCode");
returnKeys.add("organizationCode");
returnKeys.add("accountDelegateModelName");
String befoerBackLocation = lookupForm.getBackLocation();
HtmlData results = lookupableHelperServiceImpl.getReturnUrl(accountDelegateModel, lookupForm, returnKeys, businessObjectRestrictions);
assertEquals("return value", results.getDisplayText());
assertEquals(befoerBackLocation, lookupForm.getBackLocation());
}
Aggregations