Pepper  3.6.0
A highly extensible plattform for conversion and manipulationoflinguisticdata.
org.corpus_tools.pepper.testFramework.PepperManipulatorTest Class Referenceabstract

Inherits org.corpus_tools.pepper.testFramework.helpers.PepperModuleTest.

Public Member Functions

void checkThatWhenSimulatingFitnessCheckModulePassesSelfTest (final ModuleFitness fitness)
 
- Public Member Functions inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTest
void checkThatFixtureIsSet ()
 
void checkThatCorpusGraphIsSettable ()
 
void checkThatModuleHasName ()
 
void checkThatResourcePathIsSet ()
 
void checkThatWhenSimulatingFitnessCheckModulePassesSelfTest ()
 
- Public Member Functions inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTestHelper
 PepperModuleTestHelper ()
 Creates an object of type PepperModuleTest. More...
 
void initialize ()
 Initializes this object. More...
 
URI getTempURI (String testDirectory)
 Returns a File object pointing to a temporary path, where the caller can store temporary files. More...
 
File getTempPath (String testDirectory)
 Returns a File object pointing to a temporary path, where the caller can store temporary files. More...
 
void start ()
 This methods starts the processing of Pepper in the development environment. More...
 
void setResourcesURI (URI resourceURI)
 Sets the path to resources folder for module. More...
 
boolean compareFiles (URI uri1, URI uri2) throws IOException
 Compares the content of two files. More...
 
boolean compareFiles (File file1, File file2) throws IOException
 Compares the content of two files. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTestHelper
static File getTempPath_static (String testDirectory)
 {@inheritDoc PepperTestUtil::getTempPath_static(String)}
 
static String getTestResources ()
 {@inheritDoc PepperTestUtil::getTestResources()}
 
static String getSrcResources ()
 {@inheritDoc PepperTestUtil::getSrcResources()}
 
- Static Public Attributes inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTestHelper
static String TMP_TEST_DIR = PepperTestUtil.TMP_TEST_DIR
 {@inheritDoc PepperTestUtil::TMP_TEST_DIR}
 
- Protected Member Functions inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTest
ModuleFitness runSelfTest ()
 
String diffsBetweenActualAndExpected ()
 
- Protected Member Functions inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTestHelper
void setFixture (PepperModule fixture)
 Sets the current fixture to test. More...
 
PepperModule getFixture ()
 Returns the current fixture to test. More...
 
- Protected Attributes inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTestHelper
URI resourceURI = null
 
PepperModule fixture = null
 
- Static Protected Attributes inherited from org.corpus_tools.pepper.testFramework.helpers.PepperModuleTestHelper
static final Logger logger = LoggerFactory.getLogger("Pepper")
 

Detailed Description

This class is a helper class for creating tests for PepperManipulator s. This class provides a fixture declaration which could be called via setFixture(PepperManipulator). The fixture which is returned via getFixture() is of type PepperManipulator. To create an easier access, we recommend to overwrite the method getFixture() as follows:

@Override
public MY_MANIPULATOR_CLASS getFixture() {
        return (MY_MANIPULATOR_CLASS) fixture;
}

The method setFixture(PepperManipulator) sets the SaltProject and creates a single SCorpusGraph object, which is added to the list of corpus structures in the salt project. To access the salt project or the corpus structure use the following code:

        getFixture().getSaltProject();
 getFixture().getSaltProject().getCorpusGraphs()

To run the test call start() in your test method. This will start the test environment, which simulates a Pepper conversion process.

Author
florian