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(InputStream in,
org.eclipse.emf.common.util.URI uri) |
<T> T |
get(Class<T> clazz) |
<T> T |
get(com.google.inject.Key<T> key) |
protected InputStream |
getAsStream(String model) |
protected IAstFactory |
getASTFactory() |
protected String |
getCurrentFileExtension() |
protected IGrammarAccess |
getGrammarAccess() |
com.google.inject.Injector |
getInjector() |
protected InvariantChecker |
getInvariantChecker() |
protected ILinkingService |
getLinkingService() |
org.eclipse.emf.ecore.EObject |
getModel(InputStream model) |
org.eclipse.emf.ecore.EObject |
getModel(String model) |
protected org.eclipse.emf.ecore.EObject |
getModel(XtextResource resource) |
org.eclipse.emf.ecore.EObject |
getModelAndExpect(InputStream model,
int errors) |
org.eclipse.emf.ecore.EObject |
getModelAndExpect(String model,
int errors) |
protected INodeModelFormatter |
getNodeModelFormatter() |
protected IParser |
getParser() |
protected IParseResult |
getParseResult(String model) |
protected IParseResult |
getParseResultAndExpect(String model,
int errors) |
protected IParseTreeConstructor |
getParseTreeConstructor() |
XtextResource |
getResource(InputStream in) |
XtextResource |
getResource(InputStream in,
org.eclipse.emf.common.util.URI uri) |
XtextResource |
getResource(String contents,
String uri) |
XtextResource |
getResourceAndExpect(InputStream in,
int errors) |
XtextResource |
getResourceAndExpect(InputStream in,
org.eclipse.emf.common.util.URI uri,
int expectedErrors) |
protected IResourceFactory |
getResourceFactory() |
XtextResource |
getResourceFor(InputStream stream) |
protected XtextResource |
getResourceFromString(String model) |
protected XtextResource |
getResourceFromStringAndExpect(String model,
int errors) |
protected ICompositeNode |
getRootNode(InputStream model) |
protected ICompositeNode |
getRootNode(String model) |
protected ICompositeNode |
getRootNode(XtextResource resource) |
protected ICompositeNode |
getRootNodeAndExpect(InputStream model,
int errors) |
protected ICompositeNode |
getRootNodeAndExpect(String model,
int errors) |
protected IScopeProvider |
getScopeProvider() |
protected ISerializer |
getSerializer() |
protected org.eclipse.emf.common.util.URI |
getTestModelURI() |
protected IValueConverterService |
getValueConverterService() |
void |
injectMembers(Object object) |
protected String |
readFileIntoString(String filePath) |
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(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, failpublic static final int EXPECT_ERRORS
public static final int UNKNOWN_EXPECTATION
public String serialize(org.eclipse.emf.ecore.EObject obj)
protected void with(com.google.inject.Module... modules)
throws Exception
Exceptionprotected void setInjector(com.google.inject.Injector injector)
public final com.google.inject.Injector getInjector()
public <T> T get(Class<T> clazz)
public <T> T get(com.google.inject.Key<T> key)
public void injectMembers(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 InputStream getAsStream(String model)
public org.eclipse.emf.ecore.EObject getModel(String model) throws Exception
Exceptionpublic final org.eclipse.emf.ecore.EObject getModel(InputStream model) throws Exception
Exceptionpublic final org.eclipse.emf.ecore.EObject getModelAndExpect(String model, int errors) throws Exception
Exceptionpublic final org.eclipse.emf.ecore.EObject getModelAndExpect(InputStream model, int errors) throws Exception
Exceptionprotected org.eclipse.emf.ecore.EObject getModel(XtextResource resource)
protected final XtextResource getResourceFromString(String model) throws Exception
Exceptionprotected final XtextResource getResourceFromStringAndExpect(String model, int errors) throws Exception
Exceptionpublic final XtextResource getResource(InputStream in) throws Exception
Exceptionprotected String getCurrentFileExtension()
public final XtextResource getResourceFor(InputStream stream)
getResourceFor in interface ResourceLoadHelperpublic final XtextResource getResourceAndExpect(InputStream in, int errors) throws Exception
Exceptionprotected org.eclipse.emf.common.util.URI getTestModelURI()
public final XtextResource getResource(InputStream in, org.eclipse.emf.common.util.URI uri) throws Exception
Exceptionpublic final XtextResource getResource(String contents, String uri) throws Exception
Exceptionpublic final XtextResource getResourceAndExpect(InputStream in, org.eclipse.emf.common.util.URI uri, int expectedErrors) throws Exception
Exceptionprotected void checkNodeModel(XtextResource resource)
protected boolean shouldTestSerializer(XtextResource resource)
protected void disableSerializerTest()
protected XtextResource doGetResource(InputStream in, org.eclipse.emf.common.util.URI uri) throws Exception
Exceptionprotected final ICompositeNode getRootNode(InputStream model) throws Exception
Exceptionprotected final ICompositeNode getRootNodeAndExpect(InputStream model, int errors) throws Exception
Exceptionprotected final ICompositeNode getRootNode(XtextResource resource)
protected final IParseResult getParseResult(String model) throws Exception
Exceptionprotected final IParseResult getParseResultAndExpect(String model, int errors) throws Exception
Exceptionprotected final ICompositeNode getRootNode(String model) throws Exception
Exceptionprotected final ICompositeNode getRootNodeAndExpect(String model, int errors) throws Exception
Exceptionprotected String readFileIntoString(String filePath) throws IOException
IOExceptionCopyright © 2016. All Rights Reserved.