use of org.kuali.kfs.core.api.config.property.ConfigurationService in project cu-kfs by CU-CommunityApps.
the class CreateAccountingDocumentServiceImplTest method buildMockConfigurationService.
private ConfigurationService buildMockConfigurationService() throws Exception {
ConfigurationService configurationService = Mockito.mock(ConfigurationService.class);
Mockito.when(configurationService.getPropertyValueAsString(CuFPTestConstants.TEST_VALIDATION_ERROR_KEY)).thenReturn(CuFPTestConstants.TEST_VALIDATION_ERROR_MESSAGE);
Mockito.when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CREATE_ACCOUNTING_DOCUMENT_ATTACHMENT_DOWNLOAD)).thenReturn(CuFPTestConstants.TEST_ATTACHMENT_DOWNLOAD_FAILURE_MESSAGE);
Mockito.when(configurationService.getPropertyValueAsString(Mockito.startsWith(CuFPTestConstants.AV_VALIDATION_MESSAGE_KEY_PREFIX))).then(this::buildAuxiliaryVoucherErrorMessage);
Mockito.when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CREATE_ACCOUNTING_DOCUMENT_GENERIC_ERROR)).thenReturn(CuFPTestConstants.GENERIC_ERROR_MESSAGE);
Mockito.when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CREATE_ACCOUNTING_DOCUMENT_GENERIC_NUMERIC_ERROR)).thenReturn(CuFPTestConstants.GENERIC_NUMERIC_ERROR_MESSAGE);
Mockito.when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CREATE_ACCOUNTING_DOCUMENT_XML_ADAPTER_ERROR)).thenReturn(CuFPTestConstants.XML_ADAPTER_ERROR_MESSAGE);
Mockito.when(configurationService.getPropertyValueAsString(CuFPKeyConstants.VALIDATION_CREATE_ACCOUNTING_DOCUMENT_EXCEPTION_MESSAGE_REGEX)).thenReturn(CuFPTestConstants.EXCEPTION_MESSAGE_REGEX);
return configurationService;
}
use of org.kuali.kfs.core.api.config.property.ConfigurationService in project cu-kfs by CU-CommunityApps.
the class CuAttachmentServiceImplTest method buildMockConfigurationService.
private ConfigurationService buildMockConfigurationService() {
ConfigurationService mockConfigurationService = Mockito.mock(ConfigurationService.class);
Mockito.when(mockConfigurationService.getPropertyValueAsString(Mockito.any())).then(this::getConfigurationPropertyAsString);
return mockConfigurationService;
}
use of org.kuali.kfs.core.api.config.property.ConfigurationService in project cu-kfs by CU-CommunityApps.
the class RassMockServiceFactory method buildMockConfigurationService.
public ConfigurationService buildMockConfigurationService() throws Exception {
ConfigurationService configurationService = Mockito.mock(ConfigurationService.class);
Mockito.when(configurationService.getPropertyValueAsString(RassKeyConstants.MESSAGE_RASS_DOCUMENT_DESCRIPTION)).thenReturn(RassTestConstants.ResourcePropertyValues.MESSAGE_RASS_DOCUMENT_DESCRIPTION);
Mockito.when(configurationService.getPropertyValueAsString(RassKeyConstants.MESSAGE_RASS_DOCUMENT_ANNOTATION_ROUTE)).thenReturn(RassTestConstants.ResourcePropertyValues.MESSAGE_RASS_DOCUMENT_ANNOTATION_ROUTE);
Mockito.when(configurationService.getPropertyValueAsString(RassKeyConstants.MESSAGE_RASS_REPORT_ERROR_HEADER_LINE1)).thenReturn(RassTestConstants.ResourcePropertyValues.MESSAGE_RASS_REPORT_ERROR_HEADER_LINE1);
Mockito.when(configurationService.getPropertyValueAsString(RassKeyConstants.MESSAGE_RASS_REPORT_ERROR_HEADER_LINE2)).thenReturn(RassTestConstants.ResourcePropertyValues.MESSAGE_RASS_REPORT_ERROR_HEADER_LINE2);
Mockito.when(configurationService.getPropertyValueAsString(RassKeyConstants.MESSAGE_RASS_REPORT_ERROR_HEADER_LINE3)).thenReturn(RassTestConstants.ResourcePropertyValues.MESSAGE_RASS_REPORT_ERROR_HEADER_LINE3);
return configurationService;
}
Aggregations