[Groovy] Class JavadocAssertionTestBuilder
- groovy.test.JavadocAssertionTestBuilder
class JavadocAssertionTestBuilder extends Object
JavadocAssertionTestBuilder
will dynamically create a test cases from Groovy assertions placed within the Javadoc comments of a source file. Assertions should be placed within an html tag with a class="groovyTestCase"
attribute assignment. Example:
<pre class="groovyTestCase"> assert "example".size() == 7 </pre>When extracting the code for the test, single-line snippets of code without braces within a {
@code
...} tag will have the javadoc code
tag stripped. Similarly, html entities are converted back when extracting code, so <
and >
will be converted to <
and >
. Constructor Summary
Constructor and description |
---|
JavadocAssertionTestBuilder
() |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
Class |
buildTest(String filename, String code) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail
JavadocAssertionTestBuilder()
Method Detail
Class buildTest(String filename, String code)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/groovy/test/JavadocAssertionTestBuilder.html