JavadocAssertionTestSuite (Groovy 5.0.8)

Package: groovy.test

## [Groovy] Class JavadocAssertionTestSuite

- groovy.test.JavadocAssertionTestSuite

-     class JavadocAssertionTestSuite
      extends TestSuite

  `JavadocAssertionTestSuite` will dynamically create test cases from Groovy assertions placed within Javadoc comments. Assertions should be placed within an html tag with a `class="groovyTestCase"` attribute assignment. Example:

      <pre class="groovyTestCase"> assert "example".size() == 7 </pre>

  Source files will be read from the directory specified by the `javadocAssertion.src.dir` system property, including all files matching `javadocAssertion.src.pattern` and excluding files matching the `javadocAssertion.src.excludesPattern`. By default all `.java` and `.groovy` source files from `./src` will be scanned for assertions. You can also run this class as an application from the command line (assumes Groovy, JUnit and Ant are on the classpath). As an example:

  `java groovy.test.JavadocAssertionTestSuite src/main` Note: this class requires the Ant module at runtime.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `SYSPROP_SRC_DIR` | The System Property to set as base directory for collection of Classes.
    `static String` | `SYSPROP_SRC_EXCLUDES_PATTERN` | The System Property to set as a filename excludes pattern for collection of Classes.
    `static String` | `SYSPROP_SRC_PATTERN` | The System Property to set as the filename pattern for collection of Classes.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `JavadocAssertionTestSuite()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static void` | `main(String[] args)`
    `` | `static Test` | `suite()`
    `` | `static Test` | `suite(String basedir)`
    `` | `static Test` | `suite(String basedir, String includePattern)`
    `` | `static Test` | `suite(String basedir, String includePattern, String excludePattern)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class TestSuite` | `addTest, addTestSuite, countTestCases, createTest, equals, getClass, getName, getTestConstructor, hashCode, notify, notifyAll, run, runTest, setName, testAt, testCount, tests, toString, wait, wait, wait, warning`

- - ### Field Detail

    - #### public static final String SYSPROP_SRC_DIR

      The System Property to set as base directory for collection of Classes. The pattern will be used as an Ant fileset include basedir. Key is "javadocAssertion.src.dir". Defaults to the `./src` directory

    - #### public static final String SYSPROP_SRC_EXCLUDES_PATTERN

      The System Property to set as a filename excludes pattern for collection of Classes. When non-empty, the pattern will be used as Regular Expression pattern applied with the find operator against each candidate file.path. Key is "javadocAssertion.src.excludesPattern". Default value is "".

    - #### public static final String SYSPROP_SRC_PATTERN

      The System Property to set as the filename pattern for collection of Classes. The pattern will be used as Regular Expression pattern applied with the find operator against each candidate file.path. Key is "javadocAssertion.src.pattern". Defaults to including all `.java` and `.groovy` files.

  - ### Constructor Detail

    - #### JavadocAssertionTestSuite()

  - ### Method Detail

    - #### static void main(String[] args)

    - #### static Test suite()

    - #### static Test suite(String basedir)

    - #### static Test suite(String basedir, String includePattern)

    - #### static Test suite(String basedir, String includePattern, String excludePattern)