Search in sources :

Example 1 with UserProcurementProfileValidationServiceImpl

use of edu.cornell.kfs.sys.service.impl.UserProcurementProfileValidationServiceImpl in project cu-kfs by CU-CommunityApps.

the class FavoriteAccountLineBuilderTest method setUp.

@BeforeClass
public static void setUp() throws Exception {
    userProcurementProfileValidationService = new UserProcurementProfileValidationServiceImpl();
    userFavoriteAccountService = new ExtendedTestUserFavoriteAccountService();
    reqsAccounts = new ArrayList<PurApAccountingLine>();
    poAccounts = new ArrayList<PurApAccountingLine>();
    reqsItem = new RequisitionItem();
    poItem = new PurchaseOrderItem();
    reqsDoc = getMockedDocument(CuRequisitionDocument.class);
    poDoc = getMockedDocument(PurchaseOrderDocument.class);
    iwntDoc = getMockedDocument(IWantDocument.class);
    iwntDoc.setAccounts(new ArrayList<IWantAccount>());
    // Favorite Account with only some fields populated.
    testFavoriteAccount = new FavoriteAccount();
    testFavoriteAccount.setAccountLineIdentifier(TEST_FAVORITE_ACCOUNT_LINE_ID);
    testFavoriteAccount.setUserProfileId(TEST_USER_PROFILE_ID);
    testFavoriteAccount.setChartOfAccountsCode(TEST_CHART_CODE);
    testFavoriteAccount.setAccountNumber(TEST_ACCOUNT_NUMBER);
    testFavoriteAccount.setFinancialObjectCode(TEST_OBJECT_CODE);
    // Favorite Account with all fields populated (except reference objects or object ID or version number).
    testAltFavoriteAccount = new FavoriteAccount();
    testAltFavoriteAccount.setAccountLineIdentifier(TEST_ALT_FAVORITE_ACCOUNT_LINE_ID);
    testAltFavoriteAccount.setUserProfileId(TEST_ALT_USER_PROFILE_ID);
    testAltFavoriteAccount.setChartOfAccountsCode(TEST_ALT_CHART_CODE);
    testAltFavoriteAccount.setAccountNumber(TEST_ALT_ACCOUNT_NUMBER);
    testAltFavoriteAccount.setSubAccountNumber(TEST_ALT_SUB_ACCOUNT_NUMBER);
    testAltFavoriteAccount.setFinancialObjectCode(TEST_ALT_OBJECT_CODE);
    testAltFavoriteAccount.setFinancialSubObjectCode(TEST_ALT_SUB_OBJECT_CODE);
    testAltFavoriteAccount.setProjectCode(TEST_ALT_PROJECT_CODE);
    testAltFavoriteAccount.setOrganizationReferenceId(TEST_ALT_ORG_REF_ID);
    GlobalVariables.setMessageMap(new MessageMap());
}
Also used : FavoriteAccount(edu.cornell.kfs.sys.businessobject.FavoriteAccount) CuRequisitionDocument(edu.cornell.kfs.module.purap.document.CuRequisitionDocument) IWantAccount(edu.cornell.kfs.module.purap.businessobject.IWantAccount) PurApAccountingLine(org.kuali.kfs.module.purap.businessobject.PurApAccountingLine) UserProcurementProfileValidationServiceImpl(edu.cornell.kfs.sys.service.impl.UserProcurementProfileValidationServiceImpl) PurchaseOrderItem(org.kuali.kfs.module.purap.businessobject.PurchaseOrderItem) RequisitionItem(org.kuali.kfs.module.purap.businessobject.RequisitionItem) PurchaseOrderDocument(org.kuali.kfs.module.purap.document.PurchaseOrderDocument) MessageMap(org.kuali.kfs.krad.util.MessageMap) IWantDocument(edu.cornell.kfs.module.purap.document.IWantDocument) PurApFavoriteAccountLineBuilderForIWantDocument(edu.cornell.kfs.module.purap.util.PurApFavoriteAccountLineBuilderForIWantDocument) BeforeClass(org.junit.BeforeClass)

Aggregations

IWantAccount (edu.cornell.kfs.module.purap.businessobject.IWantAccount)1 CuRequisitionDocument (edu.cornell.kfs.module.purap.document.CuRequisitionDocument)1 IWantDocument (edu.cornell.kfs.module.purap.document.IWantDocument)1 PurApFavoriteAccountLineBuilderForIWantDocument (edu.cornell.kfs.module.purap.util.PurApFavoriteAccountLineBuilderForIWantDocument)1 FavoriteAccount (edu.cornell.kfs.sys.businessobject.FavoriteAccount)1 UserProcurementProfileValidationServiceImpl (edu.cornell.kfs.sys.service.impl.UserProcurementProfileValidationServiceImpl)1 BeforeClass (org.junit.BeforeClass)1 MessageMap (org.kuali.kfs.krad.util.MessageMap)1 PurApAccountingLine (org.kuali.kfs.module.purap.businessobject.PurApAccountingLine)1 PurchaseOrderItem (org.kuali.kfs.module.purap.businessobject.PurchaseOrderItem)1 RequisitionItem (org.kuali.kfs.module.purap.businessobject.RequisitionItem)1 PurchaseOrderDocument (org.kuali.kfs.module.purap.document.PurchaseOrderDocument)1