protected void asserTranslatesToDebugGrammar(final CharSequence xtextGrammar, final String expectedDebugGrammar) { try { EObject _model = super.getModel(xtextGrammar.toString()); final Grammar grammar = ((Grammar) _model); DefaultGeneratorModule _defaultGeneratorModule = new DefaultGeneratorModule(); final Injector injector = Guice.createInjector(_defaultGeneratorModule); final AntlrGeneratorFragmentTest.InMemFSA inMem = new AntlrGeneratorFragmentTest.InMemFSA(); final AntlrOptions options = new AntlrOptions(); injector.<AntlrDebugGrammarGenerator>getInstance(AntlrDebugGrammarGenerator.class).generate(grammar, options, inMem); Assert.assertEquals(expectedDebugGrammar, IterableExtensions.<Object>head(inMem.getAllFiles().values()).toString()); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@Pure public DefaultGeneratorModule getConfiguration() { return this.configuration; }
public void setConfiguration(final DefaultGeneratorModule configuration) { this.configuration = configuration; }
@Before public void createInjector() { DefaultGeneratorModule _defaultGeneratorModule = new DefaultGeneratorModule(); this.injector = Guice.createInjector(_defaultGeneratorModule); }