List<TestInfo> testInfoList = new ArrayList<TestInfo>();
// populateTestInfo(testInfo);
// THere would always be atleast one method associated with the Runner, else validation would fail.
for (FrameworkMethod method : testMethods) {
TestInfo testInfo = null;
// Only if the return type of the Method is not VOID, we try to determine the right loader and data
// files.
DataLoader loaderAnnotation = method.getAnnotation(DataLoader.class);
if (loaderAnnotation != null) {
testInfo = DataLoaderUtil.determineLoader(loaderAnnotation, getTestClass());
} else {
loaderAnnotation = getTestClass().getJavaClass().getAnnotation(DataLoader.class);
if (loaderAnnotation != null) {
testInfo = DataLoaderUtil.determineLoader(loaderAnnotation, getTestClass());
}
}
if (testInfo != null) {
testInfo.setMethodName(method.getName());
testInfoList.add(testInfo);
}
}