Griffon 1.2.0

org.codehaus.griffon.test
[Groovy] Class GriffonTestTargetPattern

java.lang.Object
  org.codehaus.griffon.test.GriffonTestTargetPattern

class GriffonTestTargetPattern

A pattern passed to `griffon test-app` that targets one or more tests and potentially a single method Examples:

  • SomeController // filePattern: **/SomeController, classPattern: SomeController, methodName: null
  • *Controller* // filePattern: **/*Controller*, classPattern: *Controller*, methodName: null
  • SomeController.testSomeAction // filePattern: **/SomeController, classPattern: SomeController, methodName: testSomeAction
  • org.SomeController // filePattern: org/SomeController, classPattern: org.SomeController, methodName: null Note: the interpretation of a target pattern is largely the responsibility of a test type.


    Property Summary
    String classPattern

    The target pattern as it applies to class names, without a methodName component

    String filePattern

    The target pattern as it applies to the file system (i.e. suitable for use with a PathMatchingResourcePatternResolver)

    String methodName

    The method name component if it is present

    String rawPattern

    The pattern, unchanged

     
    Constructor Summary
    GriffonTestTargetPattern(String pattern)

     
    Method Summary
    protected def classPatternToFilePattern(def pattern)

    protected boolean containsMethodName(def pattern)

    boolean isMethodTargeting()

    boolean matches(String className, String methodName, String[] suffixes)

    boolean matchesClass(String className, String[] suffixes)

    protected boolean matchesClassWithExtension(String className)

    protected boolean matchesClassWithoutExtension(String className, String[] suffixes)

    boolean matchesMethod(String methodName)

    String toString()

     
    Methods inherited from class Object
    wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
     

    Property Detail

    classPattern

    final String classPattern
    The target pattern as it applies to class names, without a methodName component


    filePattern

    final String filePattern
    The target pattern as it applies to the file system (i.e. suitable for use with a PathMatchingResourcePatternResolver)


    methodName

    final String methodName
    The method name component if it is present


    rawPattern

    final String rawPattern
    The pattern, unchanged


     
    Constructor Detail

    GriffonTestTargetPattern

    GriffonTestTargetPattern(String pattern)


     
    Method Detail

    classPatternToFilePattern

    protected def classPatternToFilePattern(def pattern)


    containsMethodName

    protected boolean containsMethodName(def pattern)


    isMethodTargeting

    boolean isMethodTargeting()


    matches

    boolean matches(String className, String methodName, String[] suffixes)


    matchesClass

    boolean matchesClass(String className, String[] suffixes)


    matchesClassWithExtension

    protected boolean matchesClassWithExtension(String className)


    matchesClassWithoutExtension

    protected boolean matchesClassWithoutExtension(String className, String[] suffixes)


    matchesMethod

    boolean matchesMethod(String methodName)


    toString

    String toString()


     

    Groovy Documentation