public class PepperTestUtil extends Object
PepperModule objects.| Modifier and Type | Field and Description |
|---|---|
static String |
TMP_TEST_DIR
Name of the directory where tests for Pepper and Pepper modules can be
stored.
|
| Constructor and Description |
|---|
PepperTestUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Pepper |
createDefaultPepper() |
static String |
getSrcResources()
Returns a default test folder, where to find resources for tests.
|
static File |
getTempPath_static(String testDirectory)
Returns a
File object pointing to a temporary path, where the
caller can store temporary files. |
static String |
getTestResources()
Returns a default test folder, where to find resources for tests.
|
static PepperJob |
prepareFixturesAndCreateJob(Pepper pepper,
Collection<? extends PepperModule> fixtures) |
static <T extends PepperModule> |
runPepperForTest(T... fixtures) |
static void |
start(Collection<? extends PepperModule> fixtures)
This methods starts the processing of Pepper in the development
environment for a set of Pepper modules.
|
static void |
start(Pepper pepper,
Collection<? extends PepperModule> fixtures) |
public static String TMP_TEST_DIR
public static File getTempPath_static(String testDirectory)
File object pointing to a temporary path, where the
caller can store temporary files. The temporary path is located in the
temporary directory provided by the underlying os. The resulting
directory is located in TEMP_PATH_BY_OS//
testDirectory.testDirectory - last part of the temporary pathpublic static String getSrcResources()
public static String getTestResources()
public static Pepper createDefaultPepper()
public static void start(Collection<? extends PepperModule> fixtures)
PepperImporter,
first the method
PepperImporter.importCorpusStructure(SCorpusGraph) is called. For
all kinds of fixture, the method
PepperModule.start(org.corpus_tools.salt.graph.Identifier) is
called for each SDocument object contained in the variable
PepperModule.getSaltProject(). This method will wait, until each
ModuleControllerImpl return having finished the process. CorpusDefinition and add it to this object and set its
FormatDefinition and corpus pathSCorpusGraph object as the one to be filled and add
it with
getFixture().getSaltProject().getCorpusGraphs().add(importedCorpusGraph); getFixture().importCorpusStructure(importedCorpusGraph);
fixtures - the fixture modules@SafeVarargs public static <T extends PepperModule> void runPepperForTest(T... fixtures)
start(Collection)public static PepperJob prepareFixturesAndCreateJob(Pepper pepper, Collection<? extends PepperModule> fixtures)
public static void start(Pepper pepper, Collection<? extends PepperModule> fixtures)
pepper - a pepper instance to be usedstart(Collection)Copyright © 2009–2020 Humboldt-Universität zu Berlin, INRIA. All rights reserved.