|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.easetech.easytest.loader.DataLoaderUtil
public final class DataLoaderUtil
A Utility class for loading test data. This class has methods to identify information about loading the data
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
LOG
An instance of logger associated with the test framework. |
| Constructor Summary | |
|---|---|
DataLoaderUtil()
|
|
| Method Summary | |
|---|---|
static TestInfo |
determineLoader(DataLoader testData,
org.junit.runners.model.TestClass testClass)
Method that determines the right Loader and the right Data Files for the "write output data" functionality supported by the EasyTest Framework. |
static boolean |
isMethodDataLoaded(String methodName)
Check if the data for the given method is loaded or not. |
static void |
loadData(Class<?> testClass,
org.junit.runners.model.FrameworkMethod method,
org.junit.runners.model.TestClass currentTestClass,
Map<String,List<Map<String,Object>>> writableData)
Load the Data for the given class or method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger LOG
| Constructor Detail |
|---|
public DataLoaderUtil()
| Method Detail |
|---|
public static TestInfo determineLoader(DataLoader testData,
org.junit.runners.model.TestClass testClass)
testData - an instance of DataLoader that helps in identifying the right Loader to write the
data back to the file.testClass - the class that the TestInfo object will be associated with
TestInfo an instance of TestInfo containing information about the currently executing
test.
public static void loadData(Class<?> testClass,
org.junit.runners.model.FrameworkMethod method,
org.junit.runners.model.TestClass currentTestClass,
Map<String,List<Map<String,Object>>> writableData)
DataLoader on either the class
level or the method level. In case the annotation is found, this method will load the data using the specified
loader class and then save it in the DataContext for further use by the system. We also create another copy of
the input test data that we store in the BaseSuite.writableData field. This is done in order
to facilitate the writing of the data that might be returned by the test method.
testClass - the class object, if any.method - current executing method, if any.currentTestClass - the currently executing test class. this is used to append in front of the method name to
get unique method names as there could be methods in different classes with the same name and thus we
want to avoid conflicts.writableData - The writable data that is used internally for reporting purposespublic static boolean isMethodDataLoaded(String methodName)
methodName - the name of the method whose data needs to be checked.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||