use of org.eclipse.xtext.junit4.smoketest.Scenarios in project xtext-eclipse 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;
}
Aggregations