[Groovy] Class JavadocAssertionTestBuilder
- groovy.util.JavadocAssertionTestBuilder
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 >
. 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 |
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.5.14/html/gapi/groovy/util/JavadocAssertionTestBuilder.html