I'm building a dynamic test with @DataProvider
annotation for TestNG. In Java, how to convert the data structure defined as Queue<Deque<String>> queueOfDeques = ArrayDeque<Deque<String>>();
to an Object[][]
? Based on this explanation, I tried this:
@DataProvider( name = "providedQueue" )
public static Object[][] dataForTest(){
return new Object[][]{{SomeClass.GetQueueOfDeques}};
}
Where the method GetQueueOfDeques
returns the queueOfDeques
data structure defined above. I don't know what I'm doing wrong, but it is not converting the variable as it should be, deriving that TestNG ignores the parameterized test.
java.lang.ClassCastException: com.company.product.migrationtester.ArrayDeque cannot be cast to java.lang.String