public final class DataContext extends Object
| Modifier and Type | Field and Description |
|---|---|
static InheritableThreadLocal<Map<String,List<Map<String,Object>>>> |
convertedDataThreadLocal
DataContext thread local variable that will hold the data for easy consumption by the test cases.
|
static InheritableThreadLocal<Map<String,List<Map<String,Object>>>> |
dataContextThreadLocal
DataContext thread local variable that will hold the data for easy consumption by the test cases.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanData() |
static void |
clearConvertedData()
Clears the data
|
static void |
clearData()
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 void |
setConvertedData(Map<String,List<Map<String,Object>>> data,
Boolean appendData)
Sets the converted Data.
|
static void |
setData(Map<String,List<Map<String,Object>>> data,
Boolean appendData)
Sets the Data.
|
public static final InheritableThreadLocal<Map<String,List<Map<String,Object>>>> convertedDataThreadLocal
#setConvertedData(Map) for details.public static void setData(Map<String,List<Map<String,Object>>> data, Boolean appendData)
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, Boolean appendData)
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 void cleanData()
Copyright © 2014. All rights reserved.