Search in sources :

Example 6 with AdvanceDepositDocument

use of org.kuali.kfs.fp.document.AdvanceDepositDocument in project cu-kfs by CU-CommunityApps.

the class AdvanceDepositServiceImplTest method setUp.

@Before
public void setUp() {
    advanceDepositService = new TestableAdvanceDepositServiceImpl();
    advanceDepositService.setBusinessObjectService(new MockBusinessObjectService());
    advanceDepositService.setDateTimeService(new DateTimeServiceImpl());
    advanceDepositService.setParameterService(new MockParameterServiceImpl());
    mapping = new IncomingWireAchMapping();
    mapping.setShortDescription("ARMY");
    ArrayList<String> methodNames = new ArrayList<>();
    for (Method method : AdvanceDepositDocument.class.getMethods()) {
        if (!Modifier.isFinal(method.getModifiers()) && !method.getName().startsWith("set") && !method.getName().startsWith("get")) {
            methodNames.add(method.getName());
        }
    }
    IMockBuilder<AdvanceDepositDocument> builder = EasyMock.createMockBuilder(AdvanceDepositDocument.class).addMockedMethods(methodNames.toArray(new String[0]));
    advanceDepositDocument = builder.createNiceMock();
    GlobalVariables.getMessageMap().clearErrorMessages();
}
Also used : DateTimeServiceImpl(org.kuali.rice.core.impl.datetime.DateTimeServiceImpl) MockParameterServiceImpl(edu.cornell.kfs.sys.service.mock.MockParameterServiceImpl) AdvanceDepositDocument(org.kuali.kfs.fp.document.AdvanceDepositDocument) ArrayList(java.util.ArrayList) Method(java.lang.reflect.Method) IncomingWireAchMapping(edu.cornell.kfs.fp.businessobject.IncomingWireAchMapping) Before(org.junit.Before)

Aggregations

AdvanceDepositDocument (org.kuali.kfs.fp.document.AdvanceDepositDocument)6 ParseException (java.text.ParseException)2 ArrayList (java.util.ArrayList)2 WorkflowException (org.kuali.rice.kew.api.exception.WorkflowException)2 AchIncomeTransaction (edu.cornell.kfs.fp.businessobject.AchIncomeTransaction)1 IncomingWireAchMapping (edu.cornell.kfs.fp.businessobject.IncomingWireAchMapping)1 MockParameterServiceImpl (edu.cornell.kfs.sys.service.mock.MockParameterServiceImpl)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 Method (java.lang.reflect.Method)1 RemoteException (java.rmi.RemoteException)1 HashMap (java.util.HashMap)1 List (java.util.List)1 MessagingException (javax.mail.MessagingException)1 Before (org.junit.Before)1 AdvanceDepositDetail (org.kuali.kfs.fp.businessobject.AdvanceDepositDetail)1 InvalidAddressException (org.kuali.kfs.krad.exception.InvalidAddressException)1 ValidationException (org.kuali.kfs.krad.exception.ValidationException)1 Bank (org.kuali.kfs.sys.businessobject.Bank)1 DateTimeServiceImpl (org.kuali.rice.core.impl.datetime.DateTimeServiceImpl)1