Search in sources :

Example 1 with Issue

use of com.avaloq.tools.ddk.test.core.Issue 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);
}
Also used : Issue(com.avaloq.tools.ddk.test.core.Issue) BugTest(com.avaloq.tools.ddk.test.core.BugTest) Issues(com.avaloq.tools.ddk.test.core.Issues)

Example 2 with Issue

use of com.avaloq.tools.ddk.test.core.Issue 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);
}
Also used : Issue(com.avaloq.tools.ddk.test.core.Issue) BugTest(com.avaloq.tools.ddk.test.core.BugTest) Issues(com.avaloq.tools.ddk.test.core.Issues)

Example 3 with Issue

use of com.avaloq.tools.ddk.test.core.Issue in project dsl-devkit by dsldevkit.

the class SwtBotRadioTest method testSWTRadioButtonClick.

/**
 * Test if the method {@link org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio#click()} works correctly.
 */
@Test
@Issue(value = "DSL-371", fixed = false)
public void testSWTRadioButtonClick() {
    SWTWorkbenchBot bot = new SWTWorkbenchBot();
    bot.resetWorkbench();
    testRadioButtonClick(bot);
}
Also used : SWTWorkbenchBot(org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot) Issue(com.avaloq.tools.ddk.test.core.Issue) Test(org.junit.Test)

Aggregations

Issue (com.avaloq.tools.ddk.test.core.Issue)3 BugTest (com.avaloq.tools.ddk.test.core.BugTest)2 Issues (com.avaloq.tools.ddk.test.core.Issues)2 SWTWorkbenchBot (org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot)1 Test (org.junit.Test)1