Search in sources :

Example 1 with AccountsPayableService

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);
}
Also used : DateTimeServiceImpl(org.kuali.rice.core.impl.datetime.DateTimeServiceImpl) PurapService(org.kuali.kfs.module.purap.document.service.PurapService) NoteService(org.kuali.kfs.krad.service.NoteService) AccountsPayableService(org.kuali.kfs.module.purap.document.service.AccountsPayableService) DataDictionaryService(org.kuali.kfs.kns.service.DataDictionaryService) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 DataDictionaryService (org.kuali.kfs.kns.service.DataDictionaryService)1 NoteService (org.kuali.kfs.krad.service.NoteService)1 AccountsPayableService (org.kuali.kfs.module.purap.document.service.AccountsPayableService)1 PurapService (org.kuali.kfs.module.purap.document.service.PurapService)1 DateTimeServiceImpl (org.kuali.rice.core.impl.datetime.DateTimeServiceImpl)1