Skip to content
Browse files

always try to find methods (with+without WILDCARD) and log error for

missing pattern/methodName
  • Loading branch information...
1 parent f25a0f7 commit d071942f96f673fa2d41c16f85aaabb82338d059 @schaarsc committed Aug 2, 2012
Showing with 7 additions and 11 deletions.
  1. +7 −11 src/main/java/org/junit/runner/JUnitCore.java
View
18 src/main/java/org/junit/runner/JUnitCore.java
@@ -100,18 +100,14 @@ private Result runMain(JUnitSystem system, String... args) {
if (class_method.length==2) { //found: ClassName#MethodName
Class<?> clazz= Class.forName(class_method[0]);
String methodName= class_method[1];
- if (methodName.contains(WILDCARD)) {
- final List<Description> foundMatchingMethods= findMatchingMethods(clazz, methodName);
- if (foundMatchingMethods.size()==0) {
- system.out().println("No matching method found for: " + methodName);
- Description description= Description.createSuiteDescription(each);
- Failure failure= new Failure(description, new NoTestsRemainException());
- missingClasses.add(failure);
- } else {
- methods.addAll(foundMatchingMethods);
- }
+ final List<Description> foundMatchingMethods= findMatchingMethods(clazz, methodName);
+ if (foundMatchingMethods.size()==0) {
+ system.out().println("No matching method found for: " + methodName);
+ Description description= Description.createSuiteDescription(each);
+ Failure failure= new Failure(description, new NoTestsRemainException());
+ missingClasses.add(failure);
} else {
- methods.add(Description.createTestDescription(clazz, methodName));
+ methods.addAll(foundMatchingMethods);
}
classNames2Filter.add(class_method[0]);
classes.add(clazz);

0 comments on commit d071942

Please sign in to comment.
Something went wrong with that request. Please try again.