use of org.kuali.kfs.module.purap.document.service.AccountsPayableService in project cu-kfs by CU-CommunityApps.
the class CuCreditMemoServiceImplTest method setUp.
@Before
public void setUp() throws Exception {
accountsPayableService = EasyMock.createNiceMock(AccountsPayableService.class);
EasyMock.expect(accountsPayableService.getExpiredOrClosedAccountList(creditMemoDocument)).andReturn(new HashMap<>());
EasyMock.replay(accountsPayableService);
dataDictionaryService = EasyMock.createNiceMock(DataDictionaryService.class);
EasyMock.expect(dataDictionaryService.getAttributeMaxLength(DocumentHeader.class, KRADPropertyConstants.DOCUMENT_DESCRIPTION)).andReturn(200);
EasyMock.replay(dataDictionaryService);
dateTimeService = new DateTimeServiceImpl();
documentService = new MockDocumentServiceImpl();
noteService = EasyMock.createMock(NoteService.class);
purapService = EasyMock.createMock(PurapService.class);
vendorService = new MockVendorServiceImpl();
creditMemoServiceImpl = PowerMock.createPartialMock(CuCreditMemoServiceImplTest.TestCuCreditMemoServiceImpl.class, "reIndexDocument", "getCreditMemoDocumentById");
creditMemoServiceImpl.setDocumentService(documentService);
creditMemoServiceImpl.setNoteService(noteService);
creditMemoServiceImpl.setPurapService(purapService);
creditMemoServiceImpl.setAccountsPayableService(accountsPayableService);
creditMemoServiceImpl.setVendorService(vendorService);
creditMemoServiceImpl.setDataDictionaryService(dataDictionaryService);
creditMemoDocument = setupVendorCreditMemoDocument();
mo14Person = MockPersonUtil.createMockPerson(UserNameFixture.mo14);
mo14Session = MockPersonUtil.createMockUserSession(mo14Person);
GlobalVariables.setUserSession(mo14Session);
}
Aggregations