Hi All,
I have one test method which requires couple of the Maps as input, like below :
@Test(dataProvider = "getEventsAPIInput", dataProviderClass = GetEventsDataProvider.class, description = "Get Events API Test")
public void testEvents(String testCaseId, String testCaseDescription, String testCaseType, Map<String, String> queryParams )
Now, if I want to provide inputs to this method using DataProvider class, I dont know how to pass Maps as input :
public static Object[][] getEventsAPIInput()
{
Object[][] retObjArr = {
{
"TC_001", "TestCase1", "positive", <How_To_Pass_Map_With_Multiple_KeyValue_Pairs>
},
{
"TC_002", "TestCase2", "negative", <How_To_Pass_Map_With_Multiple_KeyValue_Pairs>
},
{
"TC_003", "TestCase3", "positive", <How_To_Pass_Map_With_Multiple_KeyValue_Pairs>
},
{
"TC_004", "TestCase4", "positive", <How_To_Pass_Map_With_Multiple_KeyValue_Pairs>
},
};
return retObjArr;
}
My Input map will contain several key value pairs, and I dont want to initialize the map for each row in the DataProvider Object[][] . Can someone help how to pass the map with values ?