public abstract class AbstractXtextTests extends org.junit.Assert implements ResourceLoadHelper
Modifier and Type | Class and Description |
---|---|
static class |
AbstractXtextTests.Keys |
Modifier and Type | Field and Description |
---|---|
static int |
EXPECT_ERRORS |
static int |
UNKNOWN_EXPECTATION |
Constructor and Description |
---|
AbstractXtextTests() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkNodeModel(XtextResource resource) |
protected void |
disableSerializerTest() |
protected XtextResource |
doGetResource(java.io.InputStream in,
org.eclipse.emf.common.util.URI uri) |
<T> T |
get(java.lang.Class<T> clazz) |
<T> T |
get(com.google.inject.Key<T> key) |
protected java.io.InputStream |
getAsStream(java.lang.String model) |
protected IAstFactory |
getASTFactory() |
protected java.lang.String |
getCurrentFileExtension() |
protected IGrammarAccess |
getGrammarAccess() |
com.google.inject.Injector |
getInjector() |
protected InvariantChecker |
getInvariantChecker() |
protected ILinkingService |
getLinkingService() |
org.eclipse.emf.ecore.EObject |
getModel(java.io.InputStream model) |
org.eclipse.emf.ecore.EObject |
getModel(java.lang.String model) |
protected org.eclipse.emf.ecore.EObject |
getModel(XtextResource resource) |
org.eclipse.emf.ecore.EObject |
getModelAndExpect(java.io.InputStream model,
int errors) |
org.eclipse.emf.ecore.EObject |
getModelAndExpect(java.lang.String model,
int errors) |
protected INodeModelFormatter |
getNodeModelFormatter() |
protected IParser |
getParser() |
protected IParseResult |
getParseResult(java.lang.String model) |
protected IParseResult |
getParseResultAndExpect(java.lang.String model,
int errors) |
protected IParseTreeConstructor |
getParseTreeConstructor() |
XtextResource |
getResource(java.io.InputStream in) |
XtextResource |
getResource(java.io.InputStream in,
org.eclipse.emf.common.util.URI uri) |
XtextResource |
getResource(java.lang.String contents,
java.lang.String uri) |
XtextResource |
getResourceAndExpect(java.io.InputStream in,
int errors) |
XtextResource |
getResourceAndExpect(java.io.InputStream in,
org.eclipse.emf.common.util.URI uri,
int expectedErrors) |
protected IResourceFactory |
getResourceFactory() |
XtextResource |
getResourceFor(java.io.InputStream stream) |
protected XtextResource |
getResourceFromString(java.lang.String model) |
protected XtextResource |
getResourceFromStringAndExpect(java.lang.String model,
int errors) |
protected ICompositeNode |
getRootNode(java.io.InputStream model) |
protected ICompositeNode |
getRootNode(java.lang.String model) |
protected ICompositeNode |
getRootNode(XtextResource resource) |
protected ICompositeNode |
getRootNodeAndExpect(java.io.InputStream model,
int errors) |
protected ICompositeNode |
getRootNodeAndExpect(java.lang.String model,
int errors) |
protected IScopeProvider |
getScopeProvider() |
protected ISerializer |
getSerializer() |
protected IValueConverterService |
getValueConverterService() |
void |
injectMembers(java.lang.Object object) |
protected java.lang.String |
readFileIntoString(java.lang.String filePath) |
java.lang.String |
serialize(org.eclipse.emf.ecore.EObject obj) |
protected void |
setInjector(com.google.inject.Injector injector) |
void |
setUp() |
protected boolean |
shouldTestSerializer(XtextResource resource) |
void |
tearDown() |
protected void |
with(java.lang.Class<? extends ISetup> setupClazz) |
void |
with(ISetup setup) |
protected void |
with(com.google.inject.Module... modules)
call this to set the language class to be used in the current test.
|
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
public static final int EXPECT_ERRORS
public static final int UNKNOWN_EXPECTATION
public void setUp() throws java.lang.Exception
java.lang.Exception
public void tearDown() throws java.lang.Exception
java.lang.Exception
public java.lang.String serialize(org.eclipse.emf.ecore.EObject obj)
protected void with(com.google.inject.Module... modules) throws java.lang.Exception
java.lang.Exception
protected void with(java.lang.Class<? extends ISetup> setupClazz) throws java.lang.Exception
java.lang.Exception
public void with(ISetup setup) throws java.lang.Exception
java.lang.Exception
protected void setInjector(com.google.inject.Injector injector)
public final com.google.inject.Injector getInjector()
public <T> T get(java.lang.Class<T> clazz)
public <T> T get(com.google.inject.Key<T> key)
public void injectMembers(java.lang.Object object)
protected IParser getParser()
protected ILinkingService getLinkingService()
protected IAstFactory getASTFactory()
protected IGrammarAccess getGrammarAccess()
protected IParseTreeConstructor getParseTreeConstructor()
protected IResourceFactory getResourceFactory()
protected IValueConverterService getValueConverterService()
protected ISerializer getSerializer()
protected INodeModelFormatter getNodeModelFormatter()
protected IScopeProvider getScopeProvider()
protected InvariantChecker getInvariantChecker()
protected java.io.InputStream getAsStream(java.lang.String model)
public org.eclipse.emf.ecore.EObject getModel(java.lang.String model) throws java.lang.Exception
java.lang.Exception
public final org.eclipse.emf.ecore.EObject getModel(java.io.InputStream model) throws java.lang.Exception
java.lang.Exception
public final org.eclipse.emf.ecore.EObject getModelAndExpect(java.lang.String model, int errors) throws java.lang.Exception
java.lang.Exception
public final org.eclipse.emf.ecore.EObject getModelAndExpect(java.io.InputStream model, int errors) throws java.lang.Exception
java.lang.Exception
protected org.eclipse.emf.ecore.EObject getModel(XtextResource resource)
protected final XtextResource getResourceFromString(java.lang.String model) throws java.lang.Exception
java.lang.Exception
protected final XtextResource getResourceFromStringAndExpect(java.lang.String model, int errors) throws java.lang.Exception
java.lang.Exception
public final XtextResource getResource(java.io.InputStream in) throws java.lang.Exception
java.lang.Exception
protected java.lang.String getCurrentFileExtension()
public final XtextResource getResourceFor(java.io.InputStream stream)
getResourceFor
in interface ResourceLoadHelper
public final XtextResource getResourceAndExpect(java.io.InputStream in, int errors) throws java.lang.Exception
java.lang.Exception
public final XtextResource getResource(java.io.InputStream in, org.eclipse.emf.common.util.URI uri) throws java.lang.Exception
java.lang.Exception
public final XtextResource getResource(java.lang.String contents, java.lang.String uri) throws java.lang.Exception
java.lang.Exception
public final XtextResource getResourceAndExpect(java.io.InputStream in, org.eclipse.emf.common.util.URI uri, int expectedErrors) throws java.lang.Exception
java.lang.Exception
protected void checkNodeModel(XtextResource resource)
protected boolean shouldTestSerializer(XtextResource resource)
protected void disableSerializerTest()
protected XtextResource doGetResource(java.io.InputStream in, org.eclipse.emf.common.util.URI uri) throws java.lang.Exception
java.lang.Exception
protected final ICompositeNode getRootNode(java.io.InputStream model) throws java.lang.Exception
java.lang.Exception
protected final ICompositeNode getRootNodeAndExpect(java.io.InputStream model, int errors) throws java.lang.Exception
java.lang.Exception
protected final ICompositeNode getRootNode(XtextResource resource)
protected final IParseResult getParseResult(java.lang.String model) throws java.lang.Exception
java.lang.Exception
protected final IParseResult getParseResultAndExpect(java.lang.String model, int errors) throws java.lang.Exception
java.lang.Exception
protected final ICompositeNode getRootNode(java.lang.String model) throws java.lang.Exception
java.lang.Exception
protected final ICompositeNode getRootNodeAndExpect(java.lang.String model, int errors) throws java.lang.Exception
java.lang.Exception
protected java.lang.String readFileIntoString(java.lang.String filePath) throws java.io.IOException
java.io.IOException