diff --git a/tests/org.eclipse.xsemantics.dsl.tests/src/org/eclipse/xsemantics/dsl/tests/generator/XsemanticsGeneratorRunnerTests.java b/tests/org.eclipse.xsemantics.dsl.tests/src/org/eclipse/xsemantics/dsl/tests/generator/XsemanticsGeneratorRunnerTests.java index 7d8d9a50..665ad3ec 100644 --- a/tests/org.eclipse.xsemantics.dsl.tests/src/org/eclipse/xsemantics/dsl/tests/generator/XsemanticsGeneratorRunnerTests.java +++ b/tests/org.eclipse.xsemantics.dsl.tests/src/org/eclipse/xsemantics/dsl/tests/generator/XsemanticsGeneratorRunnerTests.java @@ -13,6 +13,7 @@ import org.eclipse.xsemantics.dsl.generator.XsemanticsOutputConfigurationProvider; import org.eclipse.xsemantics.dsl.tests.XsemanticsAbstractTests; +import org.eclipse.xsemantics.dsl.tests.XsemanticsInjectorProvider; import java.io.BufferedInputStream; import java.io.File; @@ -22,28 +23,29 @@ import java.util.List; import org.eclipse.xtext.resource.XtextResourceSet; +import org.eclipse.xtext.testing.InjectWith; +import org.eclipse.xtext.testing.XtextRunner; import org.eclipse.xtext.validation.Issue; import org.junit.Test; +import org.junit.runner.RunWith; +import com.google.inject.Inject; + +@InjectWith(XsemanticsInjectorProvider.class) +@RunWith(XtextRunner.class) public class XsemanticsGeneratorRunnerTests extends XsemanticsAbstractTests { protected static final String VALIDATION_SUBDIR = "validation/"; - GeneratorForTests generator; - - XtextResourceSet resourceSet; + @Inject + private GeneratorForTests generator; + + @Inject + private XtextResourceSet resourceSet; // static { // System.setProperty("line.separator", "\n"); // } - @Override - public void setUp() throws Exception { - super.setUp(); - generator = get(GeneratorForTests.class); - generator.setOutputPath(null); - resourceSet = get(XtextResourceSet.class); - } - protected void setGeneratorOutputPath(String outputPath) { generator.setOutputPath(outputPath); }