Package org.apache.sling.junit
Class RequestParser
java.lang.Object
org.apache.sling.junit.RequestParser
- All Implemented Interfaces:
TestSelector
Parse information from a request, to define which
tests to run and which renderer to select.
We do not use the Sling API to to that, in order to
keep the junit core module reusable in other OSGi
environments.
-
Constructor Summary
ConstructorsConstructorDescriptionRequestParser(String subpath) Parse subpath, which is in the form TEST_SELECTOR/TEST_METHOD.EXTENSION or TEST_SELECTOR.EXTENSION -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptTestName(String testName) If true, testName will be selectedReturn the extension used to render resultsReturns the name of the selected test.Return the String used to select teststoString()
-
Constructor Details
-
RequestParser
Parse subpath, which is in the form TEST_SELECTOR/TEST_METHOD.EXTENSION or TEST_SELECTOR.EXTENSION- Parameters:
subpath- the sub-path
-
-
Method Details
-
toString
-
getTestSelectorString
Description copied from interface:TestSelectorReturn the String used to select tests- Specified by:
getTestSelectorStringin interfaceTestSelector- Returns:
- the string used to select the tests
-
getExtension
Description copied from interface:TestSelectorReturn the extension used to render results- Specified by:
getExtensionin interfaceTestSelector- Returns:
- the extension used to render the results
-
getMethodName
-
acceptTestName
Description copied from interface:TestSelectorIf true, testName will be selected- Specified by:
acceptTestNamein interfaceTestSelector- Parameters:
testName- the name of the test- Returns:
trueif the test will be selected,falseotherwise
-
getSelectedTestMethodName
Description copied from interface:TestSelectorReturns the name of the selected test.- Specified by:
getSelectedTestMethodNamein interfaceTestSelector- Returns:
- the name of the selected test
-