fixed rules

This commit is contained in:
Timo Westkämper 2010-07-01 19:37:30 +00:00
parent e47f03f29e
commit eae98918ff
2 changed files with 7 additions and 2 deletions

View File

@ -28,9 +28,11 @@ public class FilteringTestRunner extends BlockJUnit4ClassRunner {
}
@Override
public void run(final RunNotifier notifier) {
public void run(RunNotifier notifier) {
if (run){
super.run(notifier);
}else{
System.err.println("skipping");
}
}

View File

@ -14,7 +14,10 @@ public class LabelRule implements MethodRule{
@Override
public Statement apply(Statement base, FrameworkMethod method, Object target) {
Label label = method.getMethod().getDeclaringClass().getAnnotation(Label.class);
boolean run = label != null && isIgnored(method.getMethod(), label.value());
boolean run = true;
if (label != null){
run = !isIgnored(method.getMethod(), label.value());
}
return run ? base : EmptyStatement.DEFAULT;
}