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;
}
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);
}
Aggregations