Permalink
Browse files

Fixed: TESTNG-152

  • Loading branch information...
1 parent 812bdd8 commit 79718dd211e8b1a92b87813df9cc0d199f249fe6 the.mindstorm committed Apr 25, 2007
Showing with 7 additions and 0 deletions.
  1. +1 −0 CHANGES.txt
  2. +6 −0 src/main/org/testng/internal/Parameters.java
View
1 CHANGES.txt
@@ -18,6 +18,7 @@ Added: Support for concurrent execution for invocationCount=1 threadPoolSize>1 a
(http://forums.opensymphony.com/thread.jspa?threadID=64738&tstart=0)
Added: New TestNG specific XML report, generated by default in 'xml' subdirectory of test-output
Added: support in strprotocol for passing the ITest.getTestName() information
+Fixed: TESTNG-152 If DataProvider is not found, the exception message should tell exactly what happened
Eclipse plug-in
View
6 src/main/org/testng/internal/Parameters.java
@@ -206,6 +206,12 @@ private static Method findDataProvider(Class clazz, Method m, IAnnotationFinder
if (null != dataProviderName && ! "".equals(dataProviderName)) {
result = findDataProvider(clazz, finder, dataProviderName, dataProviderClass);
+
+ if(null == result) {
+ throw new TestNGException("Method " + m + " requires a @DataProvider named : "
+ + dataProviderName + (dataProviderClass != null ? " in class " + dataProviderClass.getName() : "")
+ );
+ }
}
return result;

0 comments on commit 79718dd

Please sign in to comment.