Skip to content

Commit

Permalink
Fixed: TESTNG-152
Browse files Browse the repository at this point in the history
  • Loading branch information
the.mindstorm committed Apr 25, 2007
1 parent 812bdd8 commit 79718dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions src/main/org/testng/internal/Parameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79718dd

Please sign in to comment.