| java.lang.Object org.kuali.module.labor.util.TestDataPreparator
TestDataPreparator | public class TestDataPreparator (Code) | | provide with a set of utilities that can be used to prepare test data for unit testing. The core idea is to convert Java
properties into a list of specified business objects or search criteria.
|
Method Summary | |
public static Map<String, Object> | buildCleanupCriteria(Class clazz, Properties properties, String propertyKey) build the cleanup criteria for "clazz" from the given properties. | public static Map<String, Object> | buildCleanupCriteria(Class clazz, Properties properties, String propertyKey, String fieldNames, String deliminator) build the cleanup criteria for "clazz" from the given properties. | public static List | buildExpectedValueList(Class clazz, Properties properties, String propertyKeyPrefix, int numberOfData) build a list of objects of type "clazz" from the expected results provided by the given properties. | public static List | buildExpectedValueList(Class clazz, Properties properties, String propertyKeyPrefix, String fieldNames, String deliminator, int numberOfData) build a list of objects of type "clazz" from the expected results provided by the given properties
Parameters: clazz - the the specified object type. | public static List | buildTestDataList(Class clazz, Properties properties, String propertyKeyPrefix, int numberOfData) build a list of objects of type "clazz" from the test data provided by the given properties. | public static List | buildTestDataList(Class clazz, Properties properties, String propertyKeyPrefix, String fieldNames, String deliminator, int numberOfData) | public static List<LaborOriginEntry> | getLaborOriginEntryList(Properties properties, String propertyKeyPrefix, int numberOfInputData, OriginEntryGroup group) build a list of LaborOriginEntry objects from the given properties. | public static List<LaborOriginEntry> | getLaborOriginEntryList(Properties properties, String propertyKeyPrefix, String fieldNames, String deliminator, int numberOfInputData, OriginEntryGroup group) |
DEFAULT_DELIMINATOR | final public static String DEFAULT_DELIMINATOR(Code) | | |
DEFAULT_FIELD_NAMES | final public static String DEFAULT_FIELD_NAMES(Code) | | |
buildCleanupCriteria | public static Map<String, Object> buildCleanupCriteria(Class clazz, Properties properties, String propertyKey)(Code) | | build the cleanup criteria for "clazz" from the given properties. The default fieldNames and deliminator are used.
Parameters: clazz - the the specified object type. Parameters: properties - the given properties that contain the cleanup criteria fields and values Parameters: propertyKey - the given property whose value provides the cleanup criteria values the cleanup criteria for "clazz" from the given properties |
buildCleanupCriteria | public static Map<String, Object> buildCleanupCriteria(Class clazz, Properties properties, String propertyKey, String fieldNames, String deliminator)(Code) | | build the cleanup criteria for "clazz" from the given properties.
Parameters: clazz - the the specified object type. Parameters: properties - the given properties that contain the cleanup criteria fields and values Parameters: propertyKey - the given property whose value provides the cleanup criteria values Parameters: fieldNames - the field names of the cleanup columns Parameters: deliminator - the deliminator that is used to separate the field from each other the cleanup criteria for "clazz" from the given properties |
buildExpectedValueList | public static List buildExpectedValueList(Class clazz, Properties properties, String propertyKeyPrefix, int numberOfData)(Code) | | build a list of objects of type "clazz" from the expected results provided by the given properties. The default fieldNames
and deliminator are used.
Parameters: clazz - the the specified object type. The instance of this type should be comparable through overriding Object.equals() Parameters: properties - the given properties that contain the expected results Parameters: propertyKeyPrefix - the expected results with the given key prefix can be used to construct the return objects Parameters: numberOfData - the number of the expected results matching the search criteria a list of objects of type "clazz" from the expected results provided by the given properties |
buildExpectedValueList | public static List buildExpectedValueList(Class clazz, Properties properties, String propertyKeyPrefix, String fieldNames, String deliminator, int numberOfData)(Code) | | build a list of objects of type "clazz" from the expected results provided by the given properties
Parameters: clazz - the the specified object type. The instance of this type should be comparable through overriding Object.equals() Parameters: properties - the given properties that contain the expected results Parameters: propertyKeyPrefix - the expected results with the given key prefix can be used to construct the return objects Parameters: fieldNames - the field names of the expected results columns Parameters: deliminator - the deliminator that is used to separate the field from each other Parameters: numberOfData - the number of the expected results matching the search criteria a list of objects of type "clazz" from the expected results provided by the given properties |
buildTestDataList | public static List buildTestDataList(Class clazz, Properties properties, String propertyKeyPrefix, int numberOfData)(Code) | | build a list of objects of type "clazz" from the test data provided by the given properties. The default fieldNames and
deliminator are used.
Parameters: clazz - the the specified object type Parameters: properties - the given properties that contain the test data Parameters: propertyKeyPrefix - the test data with the given key prefix can be used to construct the return objects Parameters: numberOfData - the number of test data matching the search criteria a list of objects of type "clazz" from the test data provided by the given properties |
buildTestDataList | public static List buildTestDataList(Class clazz, Properties properties, String propertyKeyPrefix, String fieldNames, String deliminator, int numberOfData)(Code) | | build a list of objects of type "clazz" from the test data provided by the given properties
Parameters: clazz - the the specified object type Parameters: properties - the given properties that contain the test data Parameters: propertyKeyPrefix - the test data with the given key prefix can be used to construct the return objects Parameters: fieldNames - the field names of the test data columns Parameters: deliminator - the deliminator that is used to separate the field from each other Parameters: numberOfData - the number of test data matching the search criteria a list of objects of type "clazz" from the test data provided by the given properties |
getLaborOriginEntryList | public static List<LaborOriginEntry> getLaborOriginEntryList(Properties properties, String propertyKeyPrefix, int numberOfInputData, OriginEntryGroup group)(Code) | | build a list of LaborOriginEntry objects from the given properties. The default fieldNames and deliminator are used.
Parameters: properties - the given properties that contain the data that can be used to populate LaborOriginEntry objects Parameters: propertyKeyPrefix - the data with the given key prefix can be used to construct the return objects Parameters: fieldNames - the field names of the data columns Parameters: deliminator - the deliminator that is used to separate the field from each other Parameters: numberOfData - the number of the data matching the search criteria a list of LaborOriginEntry objects from the given properties |
getLaborOriginEntryList | public static List<LaborOriginEntry> getLaborOriginEntryList(Properties properties, String propertyKeyPrefix, String fieldNames, String deliminator, int numberOfInputData, OriginEntryGroup group)(Code) | | build a list of LaborOriginEntry objects from the given properties
Parameters: properties - the given properties that contain the data that can be used to populate LaborOriginEntry objects Parameters: propertyKeyPrefix - the data with the given key prefix can be used to construct the return objects Parameters: fieldNames - the field names of the data columns Parameters: deliminator - the deliminator that is used to separate the field from each other Parameters: numberOfData - the number of the data matching the search criteria a list of LaborOriginEntry objects from the given properties |
|
|