|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.test.cts.TestDataParser
public class TestDataParser
Finds all test files in the current classloader, read them and return test data to represent them. See
CompatibilityTestSuite for a description of the algorithm.
CompatibilityTestSuite| Constructor Summary | |
|---|---|
TestDataParser()
|
|
| Method Summary | |
|---|---|
Set<String> |
findRelativeTestDirectoryNames(String ctsRootPackageName,
String packageFilter,
String pattern)
Find *.xml files in the classpath and return the list of all resources found, without their filename
extensions. |
List<TestData> |
parseSingleTestData(String syntaxDirectory,
String ctsRootPackageName,
String relativeDirectoryName,
TestDataConfiguration configuration,
ClassLoader classLoader)
Parse data for single test. |
TestDataConfiguration |
parseTestConfiguration(String syntaxDirectory,
String ctsRootPackageName,
ClassLoader classLoader)
Parse Test configuration by looking for a config.properties file in the Syntax directory. |
List<TestData> |
parseTestData(String syntaxId,
String ctsRootPackageName,
String packageFilter,
String pattern)
Read all test data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestDataParser()
| Method Detail |
|---|
public List<TestData> parseTestData(String syntaxId,
String ctsRootPackageName,
String packageFilter,
String pattern)
throws Exception
CompatibilityTestSuite for a detailed explanation of the algorithm.
syntaxId - the id of the syntax for which to parse data forctsRootPackageName - the root of the CTS resourcespackageFilter - the regex to filter packagespattern - a regex to decide which *.xml resources should be found. The default should be to
find them all
Exception - in case of error while reading test data
public List<TestData> parseSingleTestData(String syntaxDirectory,
String ctsRootPackageName,
String relativeDirectoryName,
TestDataConfiguration configuration,
ClassLoader classLoader)
throws IOException
syntaxDirectory - the syntax directory from where to read syntax test data (eg "xwiki20" for "xwiki/2.0"
syntax)ctsRootPackageName - the root of the CTS resourcesrelativeDirectoryName - the name of the relative directory for a CTS test (eg "/simple/bold/bold1")configuration - the test configurationclassLoader - the class loader from which the test data is read from
IOException - in case of error while reading test data
public TestDataConfiguration parseTestConfiguration(String syntaxDirectory,
String ctsRootPackageName,
ClassLoader classLoader)
throws Exception
config.properties file in the Syntax directory.
syntaxDirectory - the syntax directory under which to look for the configuration filectsRootPackageName - the root of the CTS resourcesclassLoader - the class loader from which the test configuration is read from
Exception - in case of error while reading test configuration
public Set<String> findRelativeTestDirectoryNames(String ctsRootPackageName,
String packageFilter,
String pattern)
*.xml files in the classpath and return the list of all resources found, without their filename
extensions. For example if {ctsDirectoryName}/simple/bold/bold1.*.xml is found, return
simple/bold/bold1.
ctsRootPackageName - the root of the CTS resourcespackageFilter - the regex to filter packagespattern - a regex to decide which *.xml resources should be found. The default should be to find
them all
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||