Search in sources :

Example 1 with Scenario

use of org.eclipse.xtext.testing.smoketest.Scenario in project xtext-core by eclipse.

the class RunnerBuilder method getScenarios.

private static Scenario[] getScenarios(Class<?> klass, boolean completeInput) throws InitializationError {
    Scenarios annotation = klass.getAnnotation(Scenarios.class);
    if (annotation == null) {
        return Scenario.values();
    } else if (completeInput) {
        throw new InitializationError("Must not use ProcessedBy.processCompleteInput together with the Scenarios annotation");
    }
    Scenario[] result = annotation.value();
    if (result.length == 0) {
        throw new InitializationError("Must at least specify one smoke test scenario or omit the Scenarios annotation");
    }
    return result;
}
Also used : InitializationError(org.junit.runners.model.InitializationError) Scenarios(org.eclipse.xtext.testing.smoketest.Scenarios) Scenario(org.eclipse.xtext.testing.smoketest.Scenario)

Aggregations

Scenario (org.eclipse.xtext.testing.smoketest.Scenario)1 Scenarios (org.eclipse.xtext.testing.smoketest.Scenarios)1 InitializationError (org.junit.runners.model.InitializationError)1