public abstract class AbstractXtextTests extends junit.framework.TestCase 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 |
assertWithXtend(java.lang.String left,
java.lang.String right,
java.lang.Object _this) |
protected void |
assertWithXtend(java.lang.String message,
java.lang.String left,
java.lang.String right,
java.lang.Object _this) |
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.util.List<java.lang.String> |
getAllTestGrammarPaths(boolean firstOnly) |
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 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() |
protected org.eclipse.xtend.XtendFacade |
getXtendFacade() |
protected java.lang.String[] |
importedExtensions() |
void |
injectMembers(java.lang.Object object) |
protected java.lang.Object |
invokeWithXtend(java.lang.String expression,
java.lang.Object _this) |
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) |
protected void |
setUp() |
protected boolean |
shouldTestSerializer(XtextResource resource) |
protected 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.
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
public static final int EXPECT_ERRORS
public static final int UNKNOWN_EXPECTATION
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
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 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 boolean shouldTestSerializer(XtextResource resource)
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 void assertWithXtend(java.lang.String left, java.lang.String right, java.lang.Object _this)
protected java.lang.Object invokeWithXtend(java.lang.String expression, java.lang.Object _this)
protected java.lang.String[] importedExtensions()
protected void assertWithXtend(java.lang.String message, java.lang.String left, java.lang.String right, java.lang.Object _this)
protected org.eclipse.xtend.XtendFacade getXtendFacade()
protected java.lang.String readFileIntoString(java.lang.String filePath) throws java.io.IOException
java.io.IOException
protected java.util.List<java.lang.String> getAllTestGrammarPaths(boolean firstOnly)