public class SelfTestDesc extends Object
compare(SaltProject, SaltProject) or
compare(URI, URI) is called later to compare the result produced by
the module with the expected model or files.| Modifier and Type | Class and Description |
|---|---|
static class |
SelfTestDesc.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected DocumentBuilderFactory |
docBuilderFactory |
| Constructor and Description |
|---|
SelfTestDesc(org.eclipse.emf.common.util.URI inputCorpusPath,
org.eclipse.emf.common.util.URI expectedCorpusPath)
Creates an object with input corpus path and expected path.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
compare(File actualFile,
File expectedFile)
This method is called by
compare(URI, URI) to compare two files
with each other. |
boolean |
compare(org.corpus_tools.salt.common.SaltProject actualProject,
org.corpus_tools.salt.common.SaltProject expectedProject)
This method is called by the Pepper framework, when making a selftest of
the module.
|
boolean |
compare(org.eclipse.emf.common.util.URI actualCorpusPath,
org.eclipse.emf.common.util.URI expectedCorpusPath)
This method is called by the Pepper framework, when making a selftest of
the module.
|
protected boolean |
compareXML(File actualXmlFile,
File expectedXmlFile)
This method is called by
compare(URI, URI) to compare two
xmlfiles with each other. |
boolean |
equals(Object obj) |
org.eclipse.emf.common.util.URI |
getExpectedCorpusPath() |
org.eclipse.emf.common.util.URI |
getInputCorpusPath() |
int |
hashCode() |
boolean |
isValid(Collection<String> problems)
Returns whether this object was correctly instantiated by module.
|
String |
toString() |
protected final DocumentBuilderFactory docBuilderFactory
public SelfTestDesc(org.eclipse.emf.common.util.URI inputCorpusPath,
org.eclipse.emf.common.util.URI expectedCorpusPath)
inputCorpusPath - the path where the corpus used as input is locatedexpectedCorpusPath - the path where the expected corpus is locatedpublic org.eclipse.emf.common.util.URI getInputCorpusPath()
public org.eclipse.emf.common.util.URI getExpectedCorpusPath()
public boolean compare(org.corpus_tools.salt.common.SaltProject actualProject,
org.corpus_tools.salt.common.SaltProject expectedProject)
actualProject - is the project produced by the module itself (which was
generated from the files from the input corpus path)expectedProject - is the expected Salt model, which is created from the output
corpus path.public boolean compare(org.eclipse.emf.common.util.URI actualCorpusPath,
org.eclipse.emf.common.util.URI expectedCorpusPath)
actualCorpusPath - is the corpus path produced by the module itself (which was
generated from the files from the input corpus path)expectedCorpusPath - is the expected corpus pathprotected boolean compare(File actualFile, File expectedFile)
compare(URI, URI) to compare two files
with each other.
You are free to overwrite this method with your own comparison.
actualFile - the file produced by the module itself (which was generated
from the files from the input corpus path)expectedFile - the file, which is contained in expected corpus path.protected boolean compareXML(File actualXmlFile, File expectedXmlFile)
compare(URI, URI) to compare two
xmlfiles with each other.
You are free to overwrite this method with your own comparison.
actualXmlFile - the xml file produced by the module itself (which was
generated from the files from the input corpus path)expectedXmlFile - the xml file, which is contained in expected corpus path.public boolean isValid(Collection<String> problems)
problems - when object is not valid, the reason(s) are written here.Copyright © 2009–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.