use of com.avaloq.tools.ddk.test.core.Issues in project dsl-devkit by dsldevkit.
the class FixedIssueFilter method shouldRun.
/**
* {@inheritDoc}
*/
@Override
public boolean shouldRun(final Description description) {
if (FilterRegistry.isSuite(description)) {
return true;
}
// else: test class or test method
final Issues issuesAnnotation = description.getAnnotation(Issues.class);
if (issuesAnnotation != null) {
for (final Issue issueAnnotation : issuesAnnotation.value()) {
if (issueAnnotation != null && !issueAnnotation.fixed()) {
return false;
}
}
}
final Issue issueAnnotation = description.getAnnotation(Issue.class);
if (issueAnnotation != null && !issueAnnotation.fixed()) {
return false;
}
final BugTest bugTestAnnotation = description.getAnnotation(BugTest.class);
if (bugTestAnnotation != null && bugTestAnnotation.unresolved()) {
return false;
}
// if it is a test class we still want to check (and maybe run) its children
return FilterRegistry.isTestMethod(description);
}
use of com.avaloq.tools.ddk.test.core.Issues in project dsl-devkit by dsldevkit.
the class UnresolvedIssueFilter method shouldRun.
/**
* {@inheritDoc}
*/
@Override
public boolean shouldRun(final Description description) {
if (FilterRegistry.isSuite(description)) {
return true;
}
// else: test class or test method
final Issues issuesAnnotation = description.getAnnotation(Issues.class);
if (issuesAnnotation != null) {
for (final Issue issueAnnotation : issuesAnnotation.value()) {
if (issueAnnotation != null && !issueAnnotation.fixed()) {
return true;
}
}
}
final Issue issueAnnotation = description.getAnnotation(Issue.class);
if (issueAnnotation != null && !issueAnnotation.fixed()) {
return true;
}
final BugTest bugTestAnnotation = description.getAnnotation(BugTest.class);
if (bugTestAnnotation != null && bugTestAnnotation.unresolved()) {
return true;
}
// if it is a test class we still want to check (and maybe run) its children
return FilterRegistry.isTestClass(description);
}