use of org.kuali.kfs.coa.service.SubAccountService 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;
}
Aggregations