Search in sources :

Example 6 with ConfigurationService

use of org.kuali.rice.core.api.config.property.ConfigurationService in project cu-kfs by CU-CommunityApps.

the class AwsAccountingXmlDocumentAccountingLineServiceImplTest method buildMockConfigurationService.

private ConfigurationService buildMockConfigurationService() {
    ConfigurationService configurationService = mock(ConfigurationService.class);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_INVALID_GROUP_LEVEL_TYPE)).thenReturn(CuFPTestConstants.TEST_VALIDATION_GROUP_LEVEL_TYPE_INVALID_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CHART_NOT_FOUND)).thenReturn(CuFPTestConstants.TEST_VALIDATION_CHART_NOT_FOUND_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CHART_INACTIVE)).thenReturn(CuFPTestConstants.TEST_VALIDATION_CHART_INACTIVE_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_NUMBER_BLANK)).thenReturn(CuFPTestConstants.TEST_VALIDATION_ACCOUNT_NUMBER_BLANK_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_NOT_FOUND)).thenReturn(CuFPTestConstants.TEST_VALIDATION_ACCOUNT_NOT_FOUND_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_CLOSED)).thenReturn(CuFPTestConstants.TEST_VALIDATION_ACCOUNT_CLOSED_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ACCOUNT_EXPIRED)).thenReturn(CuFPTestConstants.TEST_VALIDATION_ACCOUNT_EXPIRED_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_OBJECT_CODE_NOT_FOUND)).thenReturn(CuFPTestConstants.TEST_VALIDATION_OBJECT_CODE_NOT_FOUND_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_OBJECT_CODE_INACTIVE)).thenReturn(CuFPTestConstants.TEST_VALIDATION_OBJECT_CODE_INACTIVE_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_SUB_ACCOUNT_NOT_FOUND)).thenReturn(CuFPTestConstants.TEST_VALIDATION_SUB_ACCOUNT_NOT_FOUND_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_SUB_ACCOUNT_INACTIVE)).thenReturn(CuFPTestConstants.TEST_VALIDATION_SUB_ACCOUNT_INACTIVE_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_SUB_OBJECT_NOT_FOUND)).thenReturn(CuFPTestConstants.TEST_VALIDATION_SUB_OBJECT_NOT_FOUND_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_SUB_OBJECT_INACTIVE)).thenReturn(CuFPTestConstants.TEST_VALIDATION_SUB_OBJECT_INACTIVE_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_PROJECT_CODE_NOT_FOUND)).thenReturn(CuFPTestConstants.TEST_VALIDATION_PROJECT_NOT_FOUND_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_PROJECT_CODE_INACTIVE)).thenReturn(CuFPTestConstants.TEST_VALIDATION_PROJECT_INACTIVE_ERROR_MESSAGE);
    when(configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_ORG_REF_ID_TOO_LONG)).thenReturn(CuFPTestConstants.TEST_VALIDATION_OBJ_REF_ID_TOO_LONG_ERROR_MESSAGE);
    return configurationService;
}
Also used : ConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService)

Aggregations

ConfigurationService (org.kuali.rice.core.api.config.property.ConfigurationService)6 File (java.io.File)2 CreateDoneBatchFile (edu.cornell.kfs.sys.batch.CreateDoneBatchFile)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 BatchFile (org.kuali.kfs.sys.batch.BatchFile)1 BatchInputFileServiceImpl (org.kuali.kfs.sys.batch.service.impl.BatchInputFileServiceImpl)1 SourceAccountingLine (org.kuali.kfs.sys.businessobject.SourceAccountingLine)1 TargetAccountingLine (org.kuali.kfs.sys.businessobject.TargetAccountingLine)1 AccountingDocumentBase (org.kuali.kfs.sys.document.AccountingDocumentBase)1 ActionTaken (org.kuali.rice.kew.api.action.ActionTaken)1