|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.easetech.easytest.util.DataContext
public final class DataContext
Data Context Holder for the test data and the corresponding test method. This is an internal class that
| Field Summary | |
|---|---|
static ThreadLocal<Map<String,List<Map<String,Object>>>> |
convertedDataThreadLocal
DataContext thread local variable that will hold the data for easy consumption by the test cases. |
static ThreadLocal<Map<String,List<Map<String,Object>>>> |
dataContextThreadLocal
DataContext thread local variable that will hold the data for easy consumption by the test cases. |
static ThreadLocal<String> |
nameContextThreadLocal
Test Method Name Context thread local variable that will hold the name of the test method currently executing. |
| Method Summary | |
|---|---|
static void |
clearConvertedData()
Clears the data |
static void |
clearData()
Clears the data |
static void |
clearNameData()
Clears the data |
static Map<String,List<Map<String,Object>>> |
getConvertedData()
Returns the data. |
static Map<String,List<Map<String,Object>>> |
getData()
Returns the data Look at setData(Map) for details of the content in the returned map. |
static String |
getMethodName()
|
static void |
setConvertedData(Map<String,List<Map<String,Object>>> data)
Sets the converted Data. |
static void |
setData(Map<String,List<Map<String,Object>>> data)
Sets the Data. |
static void |
setMethodName(String name)
Sets the data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ThreadLocal<Map<String,List<Map<String,Object>>>> convertedDataThreadLocal
setConvertedData(Map) for details.
public static final ThreadLocal<Map<String,List<Map<String,Object>>>> dataContextThreadLocal
setData(Map) for details.
public static final ThreadLocal<String> nameContextThreadLocal
| Method Detail |
|---|
public static void setData(Map<String,List<Map<String,Object>>> data)
data - the test data in the form :
Map<String,Object> attributeData = new HashMap<String,Object>();
attributeData.put("libraryId",0009);
attributeData.put("itemId",0008);
Map<String,List<Map<String,Object>> actualData = new HashMap<String,List<Map<String,Object>>();
actualData.put("org.easetech.easytest.example.TestExcelDataLoader:getExcelTestDataWithDouble" , Collections.singletonList(attributeData));
Note that this is different from setConvertedData(Map) in the sense that the method name does not have the attributes at the end.public static void setConvertedData(Map<String,List<Map<String,Object>>> data)
data - the test data in the form :
Map<String,Object> attributeData = new HashMap<String,Object>();
attributeData.put("libraryId",0009);
attributeData.put("itemId",0008);
Map<String,List<Map<String,Object>> actualData = new HashMap<String,List<Map<String,Object>>();
actualData.put("org.easetech.easytest.example.TestExcelDataLoader:getExcelTestDataWithDouble{libraryId=0009, itemId=0008}" , Collections.singletonList(attributeData));
public static Map<String,List<Map<String,Object>>> getConvertedData()
setConvertedData(Map) for details of the content in the returned map.
public static Map<String,List<Map<String,Object>>> getData()
setData(Map) for details of the content in the returned map.
public static void clearData()
public static void clearConvertedData()
public static String getMethodName()
public static void setMethodName(String name)
name - to setpublic static void clearNameData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||