Search in sources :

Example 1 with CuDisbursementVoucherDefaultDueDateService

use of edu.cornell.kfs.fp.document.service.CuDisbursementVoucherDefaultDueDateService in project cu-kfs by CU-CommunityApps.

the class CreateAccountingDocumentServiceImplTest method buildCuDisbursementVoucherDefaultDueDateService.

private CuDisbursementVoucherDefaultDueDateService buildCuDisbursementVoucherDefaultDueDateService() {
    CuDisbursementVoucherDefaultDueDateService service = Mockito.mock(CuDisbursementVoucherDefaultDueDateService.class);
    Calendar calendar = Calendar.getInstance();
    calendar.add(Calendar.DAY_OF_MONTH, 1);
    Mockito.when(service.findDefaultDueDate()).thenReturn(new java.sql.Date(calendar.getTimeInMillis()));
    return service;
}
Also used : Calendar(java.util.Calendar) CuDisbursementVoucherDefaultDueDateService(edu.cornell.kfs.fp.document.service.CuDisbursementVoucherDefaultDueDateService)

Example 2 with CuDisbursementVoucherDefaultDueDateService

use of edu.cornell.kfs.fp.document.service.CuDisbursementVoucherDefaultDueDateService in project cu-kfs by CU-CommunityApps.

the class CreateAccountingDocumentServiceImplTest method setUp.

@Before
public void setUp() throws Exception {
    ConfigurationService configurationService = buildMockConfigurationService();
    DateTimeService dateTimeService = buildMockDateTimeService();
    ParameterService parameterService = buildParameterService();
    CuDisbursementVoucherDefaultDueDateService cuDisbursementVoucherDefaultDueDateService = buildCuDisbursementVoucherDefaultDueDateService();
    createAccountingDocumentService = new TestCreateAccountingDocumentServiceImpl(buildMockPersonService(), buildAccountingXmlDocumentDownloadAttachmentService(), configurationService, buildMockFiscalYearFunctionControlService(), buildMockDisbursementVoucherTravelService(), buildMockUniversityDateService(), buildAccountingPeriodService(), dateTimeService, cuDisbursementVoucherDefaultDueDateService, buildCuDisbursementVoucherPayeeService(), buildMockVendorService());
    createAccountingDocumentService.initializeDocumentGeneratorsFromMappings(AccountingDocumentMapping.DI_DOCUMENT, AccountingDocumentMapping.IB_DOCUMENT, AccountingDocumentMapping.TF_DOCUMENT, AccountingDocumentMapping.BA_DOCUMENT, AccountingDocumentMapping.SB_DOCUMENT, AccountingDocumentMapping.YEDI_DOCUMENT, AccountingDocumentMapping.DV_DOCUMENT, AccountingDocumentMapping.YEBA_DOCUMENT, AccountingDocumentMapping.YETF_DOCUMENT, AccountingDocumentMapping.AV_DOCUMENT);
    createAccountingDocumentService.setAccountingDocumentBatchInputFileType(buildAccountingXmlDocumentInputFileType(dateTimeService));
    createAccountingDocumentService.setBatchInputFileService(new BatchInputFileServiceImpl());
    createAccountingDocumentService.setFileStorageService(buildFileStorageService());
    createAccountingDocumentService.setConfigurationService(configurationService);
    createAccountingDocumentService.setDocumentService(buildMockDocumentService());
    createAccountingDocumentService.setCreateAccountingDocumentReportService(new TestCreateAccountingDocumentReportService());
    createAccountingDocumentService.setParameterService(parameterService);
    createAccountingDocumentService.setCreateAccountingDocumentValidationService(buildCreateAccountingDocumentValidationService(configurationService));
    routedAccountingDocuments = new ArrayList<>();
    creationOrderedBaseFileNames = new ArrayList<>();
    createTargetTestDirectory();
    dateFormat = new SimpleDateFormat(CUKFSConstants.DATE_FORMAT_yyyyMMdd, Locale.US);
}
Also used : ParameterService(org.kuali.kfs.coreservice.framework.parameter.ParameterService) BatchInputFileServiceImpl(org.kuali.kfs.sys.batch.service.impl.BatchInputFileServiceImpl) CuDisbursementVoucherDefaultDueDateService(edu.cornell.kfs.fp.document.service.CuDisbursementVoucherDefaultDueDateService) ConfigurationService(org.kuali.kfs.core.api.config.property.ConfigurationService) DateTimeService(org.kuali.kfs.core.api.datetime.DateTimeService) SimpleDateFormat(java.text.SimpleDateFormat) Before(org.junit.Before)

Aggregations

CuDisbursementVoucherDefaultDueDateService (edu.cornell.kfs.fp.document.service.CuDisbursementVoucherDefaultDueDateService)2 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 Before (org.junit.Before)1 ConfigurationService (org.kuali.kfs.core.api.config.property.ConfigurationService)1 DateTimeService (org.kuali.kfs.core.api.datetime.DateTimeService)1 ParameterService (org.kuali.kfs.coreservice.framework.parameter.ParameterService)1 BatchInputFileServiceImpl (org.kuali.kfs.sys.batch.service.impl.BatchInputFileServiceImpl)1