Package org.apache.sling.junit
Interface TestsProvider
-
public interface TestsProviderProvides tests, for example by scanning bundles, finding test resources in a content repository, etc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<?>createTestClass(String testName)Create a test class to execute the specified test.StringgetServicePid()Return this service's PID, client might use it later to instantiate a specific test.List<String>getTestNames()Return the list of available testslonglastModified()Return the timestamp at which our list of tests was last modified
-
-
-
Method Detail
-
getServicePid
String getServicePid()
Return this service's PID, client might use it later to instantiate a specific test.- Returns:
- the service pid
-
getTestNames
List<String> getTestNames()
Return the list of available tests- Returns:
- the list of available tests
-
createTestClass
Class<?> createTestClass(String testName) throws ClassNotFoundException
Create a test class to execute the specified test. The test executes in the same thread that calls this method, to allow using ThreadLocals to pass context to the test if needed.- Parameters:
testName- the name of the test for which a test class needs to be created- Returns:
- the test class
- Throws:
ClassNotFoundException- when the class cannot be created
-
lastModified
long lastModified()
Return the timestamp at which our list of tests was last modified- Returns:
- the last modified date of the tests list as a timestamp
-
-