use of com.avaloq.tools.ddk.test.core.BugTest 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.BugTest 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);
}
use of com.avaloq.tools.ddk.test.core.BugTest in project dsl-devkit by dsldevkit.
the class ShortFragmentProviderTest method testLongFragment.
@Test
@BugTest(value = "DSL-601")
public void testLongFragment() {
int reps = 100;
EObject root = EcoreUtil.create(testClass);
EObject parent = root;
for (int i = 0; i < reps; i++) {
EObject child = EcoreUtil.create(testClass);
parent.eSet(testReference, child);
parent = child;
}
ResourceImpl resource = new ResourceImpl();
resource.getContents().add(root);
String fragment = fragmentProvider.getFragment(parent, fragmentFallback);
Assert.assertEquals("/0*" + (reps + 1), fragment);
Assert.assertEquals(parent, fragmentProvider.getEObject(resource, fragment, fragmentFallback));
}
use of com.avaloq.tools.ddk.test.core.BugTest in project dsl-devkit by dsldevkit.
the class CheckProjectWizardTest method testNextButtonChangesPage.
/**
* Tests that applying the next button changes the wizard page.
*/
@Test
@BugTest("AIG-479")
public void testNextButtonChangesPage() {
wizard.writeToTextField(Messages.PROJECT_NAME_LABEL, "a.b");
SWTBotShell projectPage = wizard.shell(Messages.PROJECT_WIZARD_WINDOW_TITLE);
wizard.changeToNextPage();
SWTBotShell catalogPage = wizard.shell(Messages.PROJECT_WIZARD_WINDOW_TITLE);
assertNotSame("Next button changed page", projectPage, catalogPage);
}
Aggregations