org.apache.sling.junit
Class RequestParser

java.lang.Object
  extended by org.apache.sling.junit.RequestParser
All Implemented Interfaces:
TestSelector

public class RequestParser
extends java.lang.Object
implements 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
RequestParser(java.lang.String subpath)
          Parse subpath, which is in the form TEST_SELECTOR/TEST_METHOD.EXTENSION or TEST_SELECTOR.EXTENSION
 
Method Summary
 boolean acceptTestName(java.lang.String testName)
          If true, testName will be selected
 java.lang.String getExtension()
          Return the extension used to render results
 java.lang.String getMethodName()
           
 java.lang.String getSelectedTestMethodName()
          If not null, only test methods having this name are executed
 java.lang.String getTestSelectorString()
          Return the String used to select tests
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestParser

public RequestParser(java.lang.String subpath)
Parse subpath, which is in the form TEST_SELECTOR/TEST_METHOD.EXTENSION or TEST_SELECTOR.EXTENSION

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTestSelectorString

public java.lang.String getTestSelectorString()
Description copied from interface: TestSelector
Return the String used to select tests

Specified by:
getTestSelectorString in interface TestSelector

getExtension

public java.lang.String getExtension()
Description copied from interface: TestSelector
Return the extension used to render results

Specified by:
getExtension in interface TestSelector

getMethodName

public java.lang.String getMethodName()

acceptTestName

public boolean acceptTestName(java.lang.String testName)
Description copied from interface: TestSelector
If true, testName will be selected

Specified by:
acceptTestName in interface TestSelector

getSelectedTestMethodName

public java.lang.String getSelectedTestMethodName()
Description copied from interface: TestSelector
If not null, only test methods having this name are executed

Specified by:
getSelectedTestMethodName in interface TestSelector


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.