Search in sources :

Example 21 with SubAccount

use of org.kuali.kfs.coa.businessobject.SubAccount in project cu-kfs by CU-CommunityApps.

the class AwsAccountingXmlDocumentAccountingLineServiceImplTest method createMockSubAccount.

private static SubAccount createMockSubAccount(SubAccountFixture subAccountFixture) {
    SubAccount subAccount = mock(SubAccount.class);
    when(subAccount.isActive()).thenReturn(subAccountFixture.active);
    return subAccount;
}
Also used : SubAccount(org.kuali.kfs.coa.businessobject.SubAccount)

Example 22 with SubAccount

use of org.kuali.kfs.coa.businessobject.SubAccount in project cu-kfs by CU-CommunityApps.

the class AwsAccountingXmlDocumentAccountingLineServiceImplTest method buildMockSubAccountService.

private SubAccountService buildMockSubAccountService() {
    SubAccountService subAccountService = mock(SubAccountService.class);
    SubAccount mockedSubAccount = createMockSubAccount(SubAccountFixture.SA_70170);
    when(subAccountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_R583805, CuFPTestConstants.TEST_SUB_ACCOUNT_NUMBER_70170)).thenReturn(mockedSubAccount);
    mockedSubAccount = createMockSubAccount(SubAccountFixture.SA_NONCA);
    when(subAccountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_R589966, CuFPTestConstants.TEST_SUB_ACCOUNT_NUMBER_NONCA)).thenReturn(mockedSubAccount);
    when(subAccountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_R589966, CuFPTestConstants.TEST_SUB_ACCOUNT_NUMBER_NONCX)).thenReturn(null);
    mockedSubAccount = createMockSubAccount(SubAccountFixture.SA_97601);
    when(subAccountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_1023715, CuFPTestConstants.TEST_SUB_ACCOUNT_NUMBER_97601)).thenReturn(mockedSubAccount);
    mockedSubAccount = createMockSubAccount(SubAccountFixture.SA_SHAN);
    when(subAccountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_CHART_CODE_CS, CuFPTestConstants.TEST_ACCOUNT_NUMBER_J801000, CuFPTestConstants.TEST_SUB_ACCOUNT_NUMBER_SHAN)).thenReturn(mockedSubAccount);
    when(subAccountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_R583805, CuFPTestConstants.TEST_SUB_ACCOUNT_NUMBER_533X)).thenReturn(null);
    return subAccountService;
}
Also used : SubAccount(org.kuali.kfs.coa.businessobject.SubAccount) SubAccountService(org.kuali.kfs.coa.service.SubAccountService)

Aggregations

SubAccount (org.kuali.kfs.coa.businessobject.SubAccount)22 A21IndirectCostRecoveryAccount (org.kuali.kfs.coa.businessobject.A21IndirectCostRecoveryAccount)7 A21SubAccount (org.kuali.kfs.coa.businessobject.A21SubAccount)7 ArrayList (java.util.ArrayList)4 Account (org.kuali.kfs.coa.businessobject.Account)4 IndirectCostRecoveryAccount (org.kuali.kfs.coa.businessobject.IndirectCostRecoveryAccount)3 SubAccountService (org.kuali.kfs.coa.service.SubAccountService)2 SubAccountGlobal (edu.cornell.kfs.coa.businessobject.SubAccountGlobal)1 SubAccountGlobalDetail (edu.cornell.kfs.coa.businessobject.SubAccountGlobalDetail)1 ValidationResult (edu.cornell.kfs.concur.businessobjects.ValidationResult)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Maintainable (org.kuali.kfs.kns.maintenance.Maintainable)1 DataDictionaryService (org.kuali.kfs.kns.service.DataDictionaryService)1 PersistableBusinessObject (org.kuali.kfs.krad.bo.PersistableBusinessObject)1 MaintenanceDocument (org.kuali.kfs.krad.maintenance.MaintenanceDocument)1 MaintenanceLock (org.kuali.kfs.krad.maintenance.MaintenanceLock)1 DocumentService (org.kuali.kfs.krad.service.DocumentService)1