use of org.kuali.kfs.coa.service.AccountService in project cu-kfs by CU-CommunityApps.
the class AwsAccountingXmlDocumentAccountingLineServiceImplTest method buildMockAccountService.
private AccountService buildMockAccountService() {
AccountService accountService = mock(AccountService.class);
Account mockedAccount = createMockAccount(AwsAccountFixture.ACCOUNT_1658328);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_1658328)).thenReturn(mockedAccount);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_165833X)).thenReturn(null);
mockedAccount = createMockAccount(AwsAccountFixture.ACCOUNT_R583805);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_R583805)).thenReturn(mockedAccount);
mockedAccount = createMockAccount(AwsAccountFixture.ACCOUNT_R589966);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_R589966)).thenReturn(mockedAccount);
mockedAccount = createMockAccount(AwsAccountFixture.ACCOUNT_R589966);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_1023715)).thenReturn(mockedAccount);
mockedAccount = createMockAccount(AwsAccountFixture.ACCOUNT_CS_J801000);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_CHART_CODE_CS, CuFPTestConstants.TEST_ACCOUNT_NUMBER_J801000)).thenReturn(mockedAccount);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_ACCOUNT_NUMBER_J80100X)).thenReturn(null);
when(accountService.getByPrimaryId(CuFPTestConstants.TEST_AWS_BILLING_DEFAULT_CHART_CODE, CuFPTestConstants.TEST_INVALID_STAR_ACCOUNT_STRING)).thenReturn(null);
return accountService;
}
Aggregations