Sync docs from master to gh-pages
This commit is contained in:
@@ -378,7 +378,7 @@ You would like to feed that instance with a proper stub definition.</p><p>At som
|
||||
restTemplate.exchange(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"http://localhost:"</span> + port + <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"/fraudcheck"</span>, HttpMethod.PUT,
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">new</span> HttpEntity<>(request, httpHeaders),
|
||||
FraudServiceResponse.<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">class</span>);</pre><p>Annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>. In the annotation provide the group id and artifact id for the Stub Runner to download stubs of your collaborators.</p><pre class="programlisting"><em><span class="hl-annotation" style="color: gray">@RunWith(SpringRunner.class)</span></em>
|
||||
<em><span class="hl-annotation" style="color: gray">@SpringBootTest(webEnvironment=WebEnvironment.NONE)</span></em>
|
||||
<em><span class="hl-annotation" style="color: gray">@SpringBootTest(webEnvironment = WebEnvironment.NONE)</span></em>
|
||||
<em><span class="hl-annotation" style="color: gray">@AutoConfigureStubRunner(ids = {"com.example:http-server-dsl:+:stubs:6565"},
|
||||
stubsMode = StubRunnerProperties.StubsMode.LOCAL)</span></em>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">public</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">class</span> LoanApplicationServiceTests {</pre><p>After that, during the tests, Spring Cloud Contract automatically finds the stubs
|
||||
@@ -674,7 +674,7 @@ Application service</code>):</p><p>Add the <code class="literal">Spring Cloud Co
|
||||
<code class="literal">group-id</code> and <code class="literal">artifact-id</code> for the Stub Runner to download the stubs of your
|
||||
collaborators. (Optional step) Because you’re playing with the collaborators offline, you
|
||||
can also provide the offline work switch (<code class="literal">StubRunnerProperties.StubsMode.LOCAL</code>).</p><pre class="programlisting"><em><span class="hl-annotation" style="color: gray">@RunWith(SpringRunner.class)</span></em>
|
||||
<em><span class="hl-annotation" style="color: gray">@SpringBootTest(webEnvironment=WebEnvironment.NONE)</span></em>
|
||||
<em><span class="hl-annotation" style="color: gray">@SpringBootTest(webEnvironment = WebEnvironment.NONE)</span></em>
|
||||
<em><span class="hl-annotation" style="color: gray">@AutoConfigureStubRunner(ids = {"com.example:http-server-dsl:+:stubs:6565"},
|
||||
stubsMode = StubRunnerProperties.StubsMode.LOCAL)</span></em>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">public</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">class</span> LoanApplicationServiceTests {</pre><p>Now, when you run your tests, you see something like this:</p><pre class="programlisting"><span class="hl-number">2016</span>-<span class="hl-number">07</span>-<span class="hl-number">19</span> <span class="hl-number">14</span>:<span class="hl-number">22</span>:<span class="hl-number">25.403</span> INFO <span class="hl-number">41050</span> --- [ main] o.s.c.c.stubrunner.AetherStubDownloader : Desired version is + - will try to resolve the latest version
|
||||
@@ -713,9 +713,8 @@ capitalize <code class="literal">fraud</code>. That gives you the <code class="l
|
||||
or whatever is necessary. In this case, use <a class="link" href="http://rest-assured.io/" target="_top">Rest Assured MVC</a> to
|
||||
start the server side <code class="literal">FraudDetectionController</code>.</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">package</span> com.example.fraud;
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">import</span> org.junit.Before;
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">import</span> io.restassured.module.mockmvc.RestAssuredMockMvc;
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">import</span> org.junit.Before;
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">public</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">class</span> FraudBase {
|
||||
<em><span class="hl-annotation" style="color: gray">@Before</span></em>
|
||||
|
||||
@@ -71,6 +71,7 @@ pseudocode):</p><pre class="programlisting">contracts {
|
||||
testFramework =<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'JUNIT'</span>
|
||||
testMode = <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'MockMvc'</span>
|
||||
generatedTestSourcesDir = project.file(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"${project.buildDir}/generated-test-sources/contracts"</span>)
|
||||
generatedTestResourcesDir = project.file(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"${project.buildDir}/generated-test-resources/contracts"</span>)
|
||||
contractsDslDir = <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"${project.rootDir}/src/test/resources/contracts"</span>
|
||||
basePackageForTests = <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'org.springframework.cloud.verifier.tests'</span>
|
||||
stubsOutputDir = project.file(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"${project.buildDir}/stubs"</span>)
|
||||
@@ -131,7 +132,9 @@ classes.</li><li class="listitem"><span class="strong"><strong>ignoredFiles</str
|
||||
should be skipped. By default, it is an empty array.</li><li class="listitem"><span class="strong"><strong>contractsDslDir</strong></span>: Specifies the directory containing contracts written using the
|
||||
GroovyDSL. By default, its value is <code class="literal">$rootDir/src/test/resources/contracts</code>.</li><li class="listitem"><span class="strong"><strong>generatedTestSourcesDir</strong></span>: Specifies the test source directory where tests generated
|
||||
from the Groovy DSL should be placed. By default its value is
|
||||
<code class="literal">$buildDir/generated-test-sources/contractVerifier</code>.</li><li class="listitem"><span class="strong"><strong>stubsOutputDir</strong></span>: Specifies the directory where the generated WireMock stubs from
|
||||
<code class="literal">$buildDir/generated-test-sources/contracts</code>.</li><li class="listitem"><span class="strong"><strong>generatedTestResourcesDir</strong></span>: Specifies the test resource directory where resources used by the tests generated
|
||||
from the Groovy DSL should be placed. By default its value is
|
||||
<code class="literal">$buildDir/generated-test-resources/contracts</code>.</li><li class="listitem"><span class="strong"><strong>stubsOutputDir</strong></span>: Specifies the directory where the generated WireMock stubs from
|
||||
the Groovy DSL should be placed.</li><li class="listitem"><span class="strong"><strong>testFramework</strong></span>: Specifies the target test framework to be used. Currently, Spock, JUnit 4 (<code class="literal">TestFramework.JUNIT</code>) and
|
||||
JUnit 5 are supported with JUnit 4 being the default framework.</li><li class="listitem"><span class="strong"><strong>contractsProperties</strong></span>: a map containing properties to be passed to Spring Cloud Contract
|
||||
components. Those properties might be used by e.g. inbuilt or custom Stub Downloaders.</li></ul></div><p>The following properties are used when you want to specify the location of the JAR
|
||||
@@ -363,7 +366,9 @@ If neither of these values are set, then the value is set to
|
||||
<code class="literal">org.springframework.cloud.contract.verifier.tests</code>.</li><li class="listitem"><span class="strong"><strong>ruleClassForTests</strong></span>: Specifies a rule that should be added to the generated test
|
||||
classes.</li><li class="listitem"><span class="strong"><strong>baseClassForTests</strong></span>: Creates a base class for all generated tests. By default, if you
|
||||
use Spock classes, the class is <code class="literal">spock.lang.Specification</code>.</li><li class="listitem"><span class="strong"><strong>contractsDirectory</strong></span>: Specifies a directory containing contracts written with the
|
||||
GroovyDSL. The default directory is <code class="literal">/src/test/resources/contracts</code>.</li><li class="listitem"><span class="strong"><strong>testFramework</strong></span>: Specifies the target test framework to be used. Currently, Spock, JUnit 4 (<code class="literal">TestFramework.JUNIT</code>) and
|
||||
GroovyDSL. The default directory is <code class="literal">/src/test/resources/contracts</code>.</li><li class="listitem"><span class="strong"><strong>generatedTestSourcesDir</strong></span>: Specifies the test source directory where tests generated
|
||||
from the Groovy DSL should be placed. By default its value is
|
||||
<code class="literal">$buildDir/generated-test-sources/contracts</code>.</li><li class="listitem"><span class="strong"><strong>generatedTestResourcesDir</strong></span>: Specifies the test resource directory where resources used by the tests generated</li><li class="listitem"><span class="strong"><strong>testFramework</strong></span>: Specifies the target test framework to be used. Currently, Spock, JUnit 4 (<code class="literal">TestFramework.JUNIT</code>) and
|
||||
JUnit 5 are supported with JUnit 4 being the default framework.</li><li class="listitem"><span class="strong"><strong>packageWithBaseClasses</strong></span>: Defines a package where all the base classes reside. This
|
||||
setting takes precedence over <span class="strong"><strong>baseClassForTests</strong></span>. The convention is such that, if you
|
||||
have a contract under (for example) <code class="literal">src/test/resources/contract/foo/bar/baz/</code> and set
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -181,7 +181,40 @@ response:
|
||||
bodyFromFile: response.json</pre><p>
|
||||
</p><p>Further assume that the JSON files is as follows:</p><p><span class="strong"><strong>request.json</strong></span></p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">{</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"status"</span> : <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"REQUEST"</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p><span class="strong"><strong>response.json</strong></span></p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">{</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"status"</span> : <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"RESPONSE"</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">}</span></pre><p>When test or stub generation takes place, the contents of the file is passed to the body
|
||||
of a request or a response. The name of the file needs to be a file with location
|
||||
relative to the folder in which the contract lays.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="contract-dsl-http-top-level-elements" href="#contract-dsl-http-top-level-elements"></a>8.2.5 HTTP Top-Level Elements</h3></div></div></div><p>The following methods can be called in the top-level closure of a contract definition.
|
||||
relative to the folder in which the contract lays.</p><p>If you need to pass the contents of a file in a binary form
|
||||
it’s enough for you to use the <code class="literal">fileAsBytes</code> method in Groovy DSL or <code class="literal">bodyFromFileAsBytes</code> field in YAML.</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">import</span> org.springframework.cloud.contract.spec.Contract
|
||||
|
||||
Contract.make {
|
||||
request {
|
||||
url(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"/1"</span>)
|
||||
method(PUT())
|
||||
headers {
|
||||
contentType(applicationOctetStream())
|
||||
}
|
||||
body(fileAsBytes(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"request.pdf"</span>))
|
||||
}
|
||||
response {
|
||||
status <span class="hl-number">200</span>
|
||||
body(fileAsBytes(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"response.pdf"</span>))
|
||||
headers {
|
||||
contentType(applicationOctetStream())
|
||||
}
|
||||
}
|
||||
}</pre><p>
|
||||
</p><p><b>YAML. </b>
|
||||
</p><pre class="programlisting">request:
|
||||
url: /1
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/octet-stream
|
||||
bodyFromFileAsBytes: request.pdf
|
||||
response:
|
||||
status: 200
|
||||
bodyFromFileAsBytes: response.pdf
|
||||
headers:
|
||||
Content-Type: application/octet-stream</pre><p>
|
||||
</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>You should use this approach whenever you want to work with binary payloads both for HTTP and messaging.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="contract-dsl-http-top-level-elements" href="#contract-dsl-http-top-level-elements"></a>8.2.5 HTTP Top-Level Elements</h3></div></div></div><p>The following methods can be called in the top-level closure of a contract definition.
|
||||
<code class="literal">request</code> and <code class="literal">response</code> are mandatory. <code class="literal">priority</code> is optional.</p><p><b>Groovy DSL. </b>
|
||||
</p><pre class="programlisting">org.springframework.cloud.contract.spec.Contract.make {
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// Definition of HTTP request part of the contract</span>
|
||||
@@ -896,16 +929,16 @@ ensure that the <code class="literal">authToken()</code> method returns everythi
|
||||
JSON path:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">String</code>: If you point to a <code class="literal">String</code> value in the JSON.</li><li class="listitem"><code class="literal">JSONArray</code>: If you point to a <code class="literal">List</code> in the JSON.</li><li class="listitem"><code class="literal">Map</code>: If you point to a <code class="literal">Map</code> in the JSON.</li><li class="listitem"><code class="literal">Number</code>: If you point to <code class="literal">Integer</code>, <code class="literal">Double</code> etc. in the JSON.</li><li class="listitem"><code class="literal">Boolean</code>: If you point to a <code class="literal">Boolean</code> in the JSON.</li></ul></div><p>In the request part of the contract, you can specify that the <code class="literal">body</code> should be taken from
|
||||
a method.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>You must provide both the consumer and the producer side. The <code class="literal">execute</code> part
|
||||
is applied for the whole body - not for parts of it.</p></td></tr></table></div><p>The following example shows how to read an object from JSON:</p><pre class="programlisting">Contract contractDsl = Contract.make {
|
||||
request {
|
||||
method <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'GET'</span>
|
||||
url <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'/something'</span>
|
||||
body(
|
||||
$(c(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'foo'</span>), p(execute(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'hashCode()'</span>)))
|
||||
)
|
||||
}
|
||||
response {
|
||||
status OK()
|
||||
}
|
||||
request {
|
||||
method <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'GET'</span>
|
||||
url <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'/something'</span>
|
||||
body(
|
||||
$(c(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'foo'</span>), p(execute(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'hashCode()'</span>)))
|
||||
)
|
||||
}
|
||||
response {
|
||||
status OK()
|
||||
}
|
||||
}</pre><p>The preceding example results in calling the <code class="literal">hashCode()</code> method in the request body.
|
||||
It should resemble the following code:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// given:</span>
|
||||
MockMvcRequestSpecification request = given()
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -370,7 +370,7 @@
|
||||
<tr class="b">
|
||||
<td></td>
|
||||
<td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_blocks.html#RightCurly">RightCurly</a></td>
|
||||
<td>12</td>
|
||||
<td>11</td>
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td></tr>
|
||||
<tr class="a">
|
||||
<td>coding</td>
|
||||
@@ -380,7 +380,7 @@
|
||||
<tr class="b">
|
||||
<td></td>
|
||||
<td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_coding.html#HiddenField">HiddenField</a></td>
|
||||
<td>34</td>
|
||||
<td>33</td>
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td></tr>
|
||||
<tr class="a">
|
||||
<td></td>
|
||||
@@ -400,7 +400,7 @@
|
||||
<tr class="b">
|
||||
<td>javadoc</td>
|
||||
<td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_javadoc.html#JavadocMethod">JavadocMethod</a></td>
|
||||
<td>55</td>
|
||||
<td>54</td>
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td></tr>
|
||||
<tr class="a">
|
||||
<td></td>
|
||||
@@ -420,12 +420,12 @@
|
||||
<tr class="b">
|
||||
<td></td>
|
||||
<td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_javadoc.html#JavadocVariable">JavadocVariable</a></td>
|
||||
<td>69</td>
|
||||
<td>70</td>
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td></tr>
|
||||
<tr class="a">
|
||||
<td>misc</td>
|
||||
<td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_misc.html#FinalParameters">FinalParameters</a></td>
|
||||
<td>55</td>
|
||||
<td>54</td>
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td></tr>
|
||||
<tr class="b">
|
||||
<td>naming</td>
|
||||
@@ -435,7 +435,7 @@
|
||||
<tr class="a">
|
||||
<td>sizes</td>
|
||||
<td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_sizes.html#LineLength">LineLength</a></td>
|
||||
<td>231</td>
|
||||
<td>234</td>
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td></tr>
|
||||
<tr class="b">
|
||||
<td></td>
|
||||
@@ -1740,264 +1740,264 @@
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>44</td></tr>
|
||||
<td>45</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 83).</td>
|
||||
<td>45</td></tr>
|
||||
<td>46</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 135).</td>
|
||||
<td>48</td></tr>
|
||||
<td>49</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>whitespace</td>
|
||||
<td>FileTabCharacter</td>
|
||||
<td>File contains tab characters (this is the first instance).</td>
|
||||
<td>51</td></tr>
|
||||
<td>52</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>51</td></tr>
|
||||
<td>52</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 148).</td>
|
||||
<td>54</td></tr>
|
||||
<td>55</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>54</td></tr>
|
||||
<td>55</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 96).</td>
|
||||
<td>57</td></tr>
|
||||
<td>58</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>57</td></tr>
|
||||
<td>58</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 98).</td>
|
||||
<td>61</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>61</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>60</td></tr>
|
||||
<td>64</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>63</td></tr>
|
||||
<td>67</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>66</td></tr>
|
||||
<td>70</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>69</td></tr>
|
||||
<td>73</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>72</td></tr>
|
||||
<td>76</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>75</td></tr>
|
||||
<td>79</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>78</td></tr>
|
||||
<td>82</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>84</td></tr>
|
||||
<td>88</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>90</td></tr>
|
||||
<td>94</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>96</td></tr>
|
||||
<td>100</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 86).</td>
|
||||
<td>103</td></tr>
|
||||
<td>107</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 99).</td>
|
||||
<td>106</td></tr>
|
||||
<td>110</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>109</td></tr>
|
||||
<td>113</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 91).</td>
|
||||
<td>110</td></tr>
|
||||
<td>114</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>115</td></tr>
|
||||
<td>119</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 92).</td>
|
||||
<td>118</td></tr>
|
||||
<td>122</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>118</td></tr>
|
||||
<td>122</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>121</td></tr>
|
||||
<td>125</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>124</td></tr>
|
||||
<td>128</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 84).</td>
|
||||
<td>128</td></tr>
|
||||
<td>132</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 88).</td>
|
||||
<td>129</td></tr>
|
||||
<td>133</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>135</td></tr>
|
||||
<td>139</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 89).</td>
|
||||
<td>139</td></tr>
|
||||
<td>143</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 87).</td>
|
||||
<td>140</td></tr>
|
||||
<td>144</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>Extra HTML tag found: </p></td>
|
||||
<td>142</td></tr>
|
||||
<td>146</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 94).</td>
|
||||
<td>143</td></tr>
|
||||
<td>147</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>149</td></tr>
|
||||
<td>153</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 92).</td>
|
||||
<td>156</td></tr>
|
||||
<td>160</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 93).</td>
|
||||
<td>157</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 93).</td>
|
||||
<td>159</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 89).</td>
|
||||
<td>161</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 93).</td>
|
||||
<td>168</td></tr>
|
||||
<td>163</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 89).</td>
|
||||
<td>169</td></tr>
|
||||
<td>165</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>Extra HTML tag found: </p></td>
|
||||
<td>171</td></tr>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 93).</td>
|
||||
<td>172</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>Extra HTML tag found: </p></td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 89).</td>
|
||||
<td>173</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
@@ -2007,111 +2007,111 @@
|
||||
<td>175</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>Extra HTML tag found: </p></td>
|
||||
<td>177</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>Extra HTML tag found: </p></td>
|
||||
<td>179</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 91).</td>
|
||||
<td>176</td></tr>
|
||||
<td>180</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>207</td></tr>
|
||||
<td>211</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 92).</td>
|
||||
<td>208</td></tr>
|
||||
<td>212</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 83).</td>
|
||||
<td>212</td></tr>
|
||||
<td>216</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>216</td></tr>
|
||||
<td>220</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 94).</td>
|
||||
<td>217</td></tr>
|
||||
<td>221</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocStyle</td>
|
||||
<td>First sentence should end with a period.</td>
|
||||
<td>223</td></tr>
|
||||
<td>227</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 86).</td>
|
||||
<td>225</td></tr>
|
||||
<td>229</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocVariable</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>230</td></tr>
|
||||
<td>234</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocMethod</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>232</td></tr>
|
||||
<td>236</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 91).</td>
|
||||
<td>233</td></tr>
|
||||
<td>237</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>misc</td>
|
||||
<td>FinalParameters</td>
|
||||
<td>Parameter aetherStubDownloaderFactory should be final.</td>
|
||||
<td>233</td></tr>
|
||||
<td>237</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>coding</td>
|
||||
<td>HiddenField</td>
|
||||
<td>'aetherStubDownloaderFactory' hides a field.</td>
|
||||
<td>233</td></tr>
|
||||
<td>237</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 83).</td>
|
||||
<td>237</td></tr>
|
||||
<td>241</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>design</td>
|
||||
<td>DesignForExtension</td>
|
||||
<td>Class 'GenerateTestsMojo' looks like designed for extension (can be subclassed), but the method 'execute' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'GenerateTestsMojo' final or making the method 'execute' static/final/abstract/empty, or adding allowed annotation for the method.</td>
|
||||
<td>237</td></tr>
|
||||
<td>241</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocMethod</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>237</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>blocks</td>
|
||||
<td>NeedBraces</td>
|
||||
<td>'if' construct must use '{}'s.</td>
|
||||
<td>239</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 137).</td>
|
||||
<td>241</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
@@ -2123,188 +2123,188 @@
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 117).</td>
|
||||
<td>Line is longer than 80 characters (found 137).</td>
|
||||
<td>245</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 86).</td>
|
||||
<td>246</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>blocks</td>
|
||||
<td>NeedBraces</td>
|
||||
<td>'if' construct must use '{}'s.</td>
|
||||
<td>247</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 117).</td>
|
||||
<td>249</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 86).</td>
|
||||
<td>250</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>blocks</td>
|
||||
<td>NeedBraces</td>
|
||||
<td>'if' construct must use '{}'s.</td>
|
||||
<td>251</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 110).</td>
|
||||
<td>249</td></tr>
|
||||
<td>253</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 82).</td>
|
||||
<td>250</td></tr>
|
||||
<td>254</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 128).</td>
|
||||
<td>254</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 103).</td>
|
||||
<td>255</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 84).</td>
|
||||
<td>257</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>coding</td>
|
||||
<td>HiddenField</td>
|
||||
<td>'contractsDirectory' hides a field.</td>
|
||||
<td>257</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 105).</td>
|
||||
<td>258</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 95).</td>
|
||||
<td>Line is longer than 80 characters (found 103).</td>
|
||||
<td>259</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 100).</td>
|
||||
<td>260</td></tr>
|
||||
<td>Line is longer than 80 characters (found 84).</td>
|
||||
<td>261</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 93).</td>
|
||||
<td>coding</td>
|
||||
<td>HiddenField</td>
|
||||
<td>'contractsDirectory' hides a field.</td>
|
||||
<td>261</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 102).</td>
|
||||
<td>Line is longer than 80 characters (found 105).</td>
|
||||
<td>262</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 102).</td>
|
||||
<td>Line is longer than 80 characters (found 95).</td>
|
||||
<td>263</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 100).</td>
|
||||
<td>264</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 93).</td>
|
||||
<td>265</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 106).</td>
|
||||
<td>268</td></tr>
|
||||
<td>Line is longer than 80 characters (found 102).</td>
|
||||
<td>266</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 102).</td>
|
||||
<td>271</td></tr>
|
||||
<td>269</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 106).</td>
|
||||
<td>272</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 88).</td>
|
||||
<td>274</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 101).</td>
|
||||
<td>275</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 101).</td>
|
||||
<td>276</td></tr>
|
||||
<td>Line is longer than 80 characters (found 102).</td>
|
||||
<td>279</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 90).</td>
|
||||
<td>Line is longer than 80 characters (found 88).</td>
|
||||
<td>282</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>blocks</td>
|
||||
<td>RightCurly</td>
|
||||
<td>'}' at column 3 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 101).</td>
|
||||
<td>283</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 108).</td>
|
||||
<td>286</td></tr>
|
||||
<td>Line is longer than 80 characters (found 101).</td>
|
||||
<td>284</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocMethod</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>292</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>misc</td>
|
||||
<td>FinalParameters</td>
|
||||
<td>Parameter config should be final.</td>
|
||||
<td>292</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>misc</td>
|
||||
<td>FinalParameters</td>
|
||||
<td>Parameter contractsDirectory should be final.</td>
|
||||
<td>293</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>coding</td>
|
||||
<td>HiddenField</td>
|
||||
<td>'contractsDirectory' hides a field.</td>
|
||||
<td>293</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocMethod</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>314</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>misc</td>
|
||||
<td>FinalParameters</td>
|
||||
<td>Parameter contractsDirectory should be final.</td>
|
||||
<td>314</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>coding</td>
|
||||
<td>HiddenField</td>
|
||||
<td>'contractsDirectory' hides a field.</td>
|
||||
<td>314</td></tr>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 90).</td>
|
||||
<td>290</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>blocks</td>
|
||||
<td>RightCurly</td>
|
||||
<td>'}' at column 3 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).</td>
|
||||
<td>317</td></tr>
|
||||
<td>291</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 108).</td>
|
||||
<td>294</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>javadoc</td>
|
||||
<td>JavadocMethod</td>
|
||||
<td>Missing a Javadoc comment.</td>
|
||||
<td>300</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>misc</td>
|
||||
<td>FinalParameters</td>
|
||||
<td>Parameter config should be final.</td>
|
||||
<td>300</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>misc</td>
|
||||
<td>FinalParameters</td>
|
||||
<td>Parameter contractsDirectory should be final.</td>
|
||||
<td>301</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>coding</td>
|
||||
<td>HiddenField</td>
|
||||
<td>'contractsDirectory' hides a field.</td>
|
||||
<td>301</td></tr>
|
||||
<tr class="b">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>sizes</td>
|
||||
<td>LineLength</td>
|
||||
<td>Line is longer than 80 characters (found 84).</td>
|
||||
<td>304</td></tr>
|
||||
<tr class="a">
|
||||
<td><img src="images/icon_error_sml.gif" alt="" /> Error</td>
|
||||
<td>design</td>
|
||||
|
||||
@@ -509,6 +509,17 @@ folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>
|
||||
|
||||
<tr class="a">
|
||||
|
||||
<td><b><a href="#generatedTestResourcesDir">generatedTestResourcesDir</a></b></td>
|
||||
|
||||
<td><tt>File</tt></td>
|
||||
|
||||
<td><tt>-</tt></td>
|
||||
|
||||
<td>(no description)<br /><b>Default value is</b>: <tt>${project.build.directory}/generated-test-resources/contracts</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="b">
|
||||
|
||||
<td><b><a href="#generatedTestSourcesDir">generatedTestSourcesDir</a></b></td>
|
||||
|
||||
<td><tt>File</tt></td>
|
||||
@@ -518,7 +529,7 @@ folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>
|
||||
<td>(no description)<br /><b>Default value is</b>: <tt>${project.build.directory}/generated-test-sources/contracts</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="b">
|
||||
<tr class="a">
|
||||
|
||||
<td><b><a href="#ignoredFiles">ignoredFiles</a></b></td>
|
||||
|
||||
@@ -530,7 +541,7 @@ folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>
|
||||
@Ignored tests<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="a">
|
||||
<tr class="b">
|
||||
|
||||
<td><b><a href="#imports">imports</a></b></td>
|
||||
|
||||
@@ -541,7 +552,7 @@ folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>
|
||||
<td>Imports that should be added to generated tests<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="b">
|
||||
<tr class="a">
|
||||
|
||||
<td><b><a href="#includedFiles">includedFiles</a></b></td>
|
||||
|
||||
@@ -552,7 +563,7 @@ folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>
|
||||
<td>Patterns that should be taken into account for processing<br /><b>User property is</b>: <tt>includedFiles</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="a">
|
||||
<tr class="b">
|
||||
|
||||
<td><b><a href="#mavenTestSkip">mavenTestSkip</a></b></td>
|
||||
|
||||
@@ -563,7 +574,7 @@ folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>
|
||||
<td>(no description)<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>maven.test.skip</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="b">
|
||||
<tr class="a">
|
||||
|
||||
<td><b><a href="#nameSuffixForTests">nameSuffixForTests</a></b></td>
|
||||
|
||||
@@ -574,7 +585,7 @@ folder after running tests<br /><b>Default value is</b>: <tt>true</tt>.<br /><b>
|
||||
<td>(no description)<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="a">
|
||||
<tr class="b">
|
||||
|
||||
<td><b><a href="#packageWithBaseClasses">packageWithBaseClasses</a></b></td>
|
||||
|
||||
@@ -593,7 +604,7 @@ test source file that will have the package
|
||||
last folders to and attach <tt>Base</tt> to its name.<br /><b>User property is</b>: <tt>packageWithBaseClasses</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="b">
|
||||
<tr class="a">
|
||||
|
||||
<td><b><a href="#ruleClassForTests">ruleClassForTests</a></b></td>
|
||||
|
||||
@@ -604,7 +615,7 @@ last folders to and attach <tt>Base</tt> to its name.<br /><b>User property is</
|
||||
<td>(no description)<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="a">
|
||||
<tr class="b">
|
||||
|
||||
<td><b><a href="#skip">skip</a></b></td>
|
||||
|
||||
@@ -615,7 +626,7 @@ last folders to and attach <tt>Base</tt> to its name.<br /><b>User property is</
|
||||
<td>(no description)<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>spring.cloud.contract.verifier.skip</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="b">
|
||||
<tr class="a">
|
||||
|
||||
<td><b><a href="#skipTests">skipTests</a></b></td>
|
||||
|
||||
@@ -626,7 +637,7 @@ last folders to and attach <tt>Base</tt> to its name.<br /><b>User property is</
|
||||
<td>(no description)<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>skipTests</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="a">
|
||||
<tr class="b">
|
||||
|
||||
<td><b><a href="#staticImports">staticImports</a></b></td>
|
||||
|
||||
@@ -637,7 +648,7 @@ last folders to and attach <tt>Base</tt> to its name.<br /><b>User property is</
|
||||
<td>Static imports that should be added to generated tests<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="b">
|
||||
<tr class="a">
|
||||
|
||||
<td><b><a href="#testFramework">testFramework</a></b></td>
|
||||
|
||||
@@ -648,7 +659,7 @@ last folders to and attach <tt>Base</tt> to its name.<br /><b>User property is</
|
||||
<td>(no description)<br /><b>Default value is</b>: <tt>JUNIT</tt>.<br /></td>
|
||||
</tr>
|
||||
|
||||
<tr class="a">
|
||||
<tr class="b">
|
||||
|
||||
<td><b><a href="#testMode">testMode</a></b></td>
|
||||
|
||||
@@ -898,6 +909,18 @@ folder after running tests</div>
|
||||
|
||||
<li><b>Required</b>: <tt>No</tt></li>
|
||||
</ul><hr />
|
||||
<p><b><a name="generatedTestResourcesDir">generatedTestResourcesDir</a>:</b></p>
|
||||
|
||||
<div>(no description)</div>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><b>Type</b>: <tt>java.io.File</tt></li>
|
||||
|
||||
<li><b>Required</b>: <tt>No</tt></li>
|
||||
|
||||
<li><b>Default</b>: <tt>${project.build.directory}/generated-test-resources/contracts</tt></li>
|
||||
</ul><hr />
|
||||
<p><b><a name="generatedTestSourcesDir">generatedTestSourcesDir</a>:</b></p>
|
||||
|
||||
<div>(no description)</div>
|
||||
|
||||
@@ -684,7 +684,7 @@ You would like to feed that instance with a proper stub definition.</simpara>
|
||||
FraudServiceResponse.class);</programlisting>
|
||||
<simpara>Annotate your test class with <literal>@AutoConfigureStubRunner</literal>. In the annotation provide the group id and artifact id for the Stub Runner to download stubs of your collaborators.</simpara>
|
||||
<programlisting language="groovy" linenumbering="unnumbered">@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment=WebEnvironment.NONE)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE)
|
||||
@AutoConfigureStubRunner(ids = {"com.example:http-server-dsl:+:stubs:6565"},
|
||||
stubsMode = StubRunnerProperties.StubsMode.LOCAL)
|
||||
public class LoanApplicationServiceTests {</programlisting>
|
||||
@@ -1142,7 +1142,7 @@ Application service</literal>):</simpara>
|
||||
collaborators. (Optional step) Because you’re playing with the collaborators offline, you
|
||||
can also provide the offline work switch (<literal>StubRunnerProperties.StubsMode.LOCAL</literal>).</simpara>
|
||||
<programlisting language="groovy" linenumbering="unnumbered">@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment=WebEnvironment.NONE)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE)
|
||||
@AutoConfigureStubRunner(ids = {"com.example:http-server-dsl:+:stubs:6565"},
|
||||
stubsMode = StubRunnerProperties.StubsMode.LOCAL)
|
||||
public class LoanApplicationServiceTests {</programlisting>
|
||||
@@ -1205,9 +1205,8 @@ or whatever is necessary. In this case, use <link xl:href="http://rest-assured.i
|
||||
start the server side <literal>FraudDetectionController</literal>.</simpara>
|
||||
<programlisting language="java" linenumbering="unnumbered">package com.example.fraud;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
import io.restassured.module.mockmvc.RestAssuredMockMvc;
|
||||
import org.junit.Before;
|
||||
|
||||
public class FraudBase {
|
||||
@Before
|
||||
@@ -2501,6 +2500,7 @@ pseudocode):</simpara>
|
||||
testFramework ='JUNIT'
|
||||
testMode = 'MockMvc'
|
||||
generatedTestSourcesDir = project.file("${project.buildDir}/generated-test-sources/contracts")
|
||||
generatedTestResourcesDir = project.file("${project.buildDir}/generated-test-resources/contracts")
|
||||
contractsDslDir = "${project.rootDir}/src/test/resources/contracts"
|
||||
basePackageForTests = 'org.springframework.cloud.verifier.tests'
|
||||
stubsOutputDir = project.file("${project.buildDir}/stubs")
|
||||
@@ -2602,7 +2602,12 @@ GroovyDSL. By default, its value is <literal>$rootDir/src/test/resources/contrac
|
||||
<listitem>
|
||||
<simpara><emphasis role="strong">generatedTestSourcesDir</emphasis>: Specifies the test source directory where tests generated
|
||||
from the Groovy DSL should be placed. By default its value is
|
||||
<literal>$buildDir/generated-test-sources/contractVerifier</literal>.</simpara>
|
||||
<literal>$buildDir/generated-test-sources/contracts</literal>.</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara><emphasis role="strong">generatedTestResourcesDir</emphasis>: Specifies the test resource directory where resources used by the tests generated
|
||||
from the Groovy DSL should be placed. By default its value is
|
||||
<literal>$buildDir/generated-test-resources/contracts</literal>.</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara><emphasis role="strong">stubsOutputDir</emphasis>: Specifies the directory where the generated WireMock stubs from
|
||||
@@ -3013,6 +3018,14 @@ use Spock classes, the class is <literal>spock.lang.Specification</literal>.</si
|
||||
GroovyDSL. The default directory is <literal>/src/test/resources/contracts</literal>.</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara><emphasis role="strong">generatedTestSourcesDir</emphasis>: Specifies the test source directory where tests generated
|
||||
from the Groovy DSL should be placed. By default its value is
|
||||
<literal>$buildDir/generated-test-sources/contracts</literal>.</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara><emphasis role="strong">generatedTestResourcesDir</emphasis>: Specifies the test resource directory where resources used by the tests generated</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara><emphasis role="strong">testFramework</emphasis>: Specifies the target test framework to be used. Currently, Spock, JUnit 4 (<literal>TestFramework.JUNIT</literal>) and
|
||||
JUnit 5 are supported with JUnit 4 being the default framework.</simpara>
|
||||
</listitem>
|
||||
@@ -6230,6 +6243,51 @@ response:
|
||||
<simpara>When test or stub generation takes place, the contents of the file is passed to the body
|
||||
of a request or a response. The name of the file needs to be a file with location
|
||||
relative to the folder in which the contract lays.</simpara>
|
||||
<simpara>If you need to pass the contents of a file in a binary form
|
||||
it’s enough for you to use the <literal>fileAsBytes</literal> method in Groovy DSL or <literal>bodyFromFileAsBytes</literal> field in YAML.</simpara>
|
||||
<formalpara>
|
||||
<title>Groovy DSL</title>
|
||||
<para>
|
||||
<programlisting language="groovy" linenumbering="unnumbered">import org.springframework.cloud.contract.spec.Contract
|
||||
|
||||
Contract.make {
|
||||
request {
|
||||
url("/1")
|
||||
method(PUT())
|
||||
headers {
|
||||
contentType(applicationOctetStream())
|
||||
}
|
||||
body(fileAsBytes("request.pdf"))
|
||||
}
|
||||
response {
|
||||
status 200
|
||||
body(fileAsBytes("response.pdf"))
|
||||
headers {
|
||||
contentType(applicationOctetStream())
|
||||
}
|
||||
}
|
||||
}</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>YAML</title>
|
||||
<para>
|
||||
<programlisting language="yml" linenumbering="unnumbered">request:
|
||||
url: /1
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/octet-stream
|
||||
bodyFromFileAsBytes: request.pdf
|
||||
response:
|
||||
status: 200
|
||||
bodyFromFileAsBytes: response.pdf
|
||||
headers:
|
||||
Content-Type: application/octet-stream</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<important>
|
||||
<simpara>You should use this approach whenever you want to work with binary payloads both for HTTP and messaging.</simpara>
|
||||
</important>
|
||||
</section>
|
||||
<section xml:id="contract-dsl-http-top-level-elements">
|
||||
<title>HTTP Top-Level Elements</title>
|
||||
@@ -7174,16 +7232,16 @@ is applied for the whole body - not for parts of it.</simpara>
|
||||
</important>
|
||||
<simpara>The following example shows how to read an object from JSON:</simpara>
|
||||
<programlisting language="groovy" linenumbering="unnumbered">Contract contractDsl = Contract.make {
|
||||
request {
|
||||
method 'GET'
|
||||
url '/something'
|
||||
body(
|
||||
$(c('foo'), p(execute('hashCode()')))
|
||||
)
|
||||
}
|
||||
response {
|
||||
status OK()
|
||||
}
|
||||
request {
|
||||
method 'GET'
|
||||
url '/something'
|
||||
body(
|
||||
$(c('foo'), p(execute('hashCode()')))
|
||||
)
|
||||
}
|
||||
response {
|
||||
status OK()
|
||||
}
|
||||
}</programlisting>
|
||||
<simpara>The preceding example results in calling the <literal>hashCode()</literal> method in the request body.
|
||||
It should resemble the following code:</simpara>
|
||||
@@ -9290,37 +9348,53 @@ current Pact version that you use.</simpara>
|
||||
way the verifier builds Java tests, you can register your own implementation.</simpara>
|
||||
<simpara>The <literal>SingleTestGenerator</literal> interface lets you register your own implementation. The
|
||||
following code listing shows the <literal>SingleTestGenerator</literal> interface:</simpara>
|
||||
<programlisting language="groovy" linenumbering="unnumbered">package org.springframework.cloud.contract.verifier.builder
|
||||
|
||||
import org.springframework.cloud.contract.verifier.config.ContractVerifierConfigProperties
|
||||
import org.springframework.cloud.contract.verifier.file.ContractMetadata
|
||||
/**
|
||||
* Builds a single test.
|
||||
*
|
||||
* @since 1.1.0
|
||||
*/
|
||||
interface SingleTestGenerator {
|
||||
<programlisting language="groovy" linenumbering="unnumbered"> *
|
||||
* @param properties - properties passed to the plugin
|
||||
* @param listOfFiles - list of parsed contracts with additional metadata
|
||||
* @param className - the name of the generated test class
|
||||
* @param classPackage - the name of the package in which the test class should be stored
|
||||
* @param includedDirectoryRelativePath - relative path to the included directory
|
||||
* @return contents of a single test class
|
||||
* @deprecated use {@link SingleTestGenerator#buildClass(ContractVerifierConfigProperties, Collection, String, GeneratedClassData)}
|
||||
*/
|
||||
@Deprecated
|
||||
String buildClass(ContractVerifierConfigProperties properties,
|
||||
Collection<ContractMetadata> listOfFiles, String className, String classPackage, String includedDirectoryRelativePath);
|
||||
|
||||
/**
|
||||
* Creates contents of a single test class in which all test scenarios from
|
||||
* the contract metadata should be placed.
|
||||
*
|
||||
* @param properties - properties passed to the plugin
|
||||
* @param listOfFiles - list of parsed contracts with additional metadata
|
||||
* @param className - the name of the generated test class
|
||||
* @param classPackage - the name of the package in which the test class should be stored
|
||||
* @param properties - properties passed to the plugin
|
||||
* @param listOfFiles - list of parsed contracts with additional metadata
|
||||
* @param generatedClassData - information about the generated class
|
||||
* @param includedDirectoryRelativePath - relative path to the included directory
|
||||
* @return contents of a single test class
|
||||
*/
|
||||
String buildClass(ContractVerifierConfigProperties properties, Collection<ContractMetadata> listOfFiles,
|
||||
String className, String classPackage, String includedDirectoryRelativePath)
|
||||
default String buildClass(ContractVerifierConfigProperties properties,
|
||||
Collection<ContractMetadata> listOfFiles, String includedDirectoryRelativePath, GeneratedClassData generatedClassData) {
|
||||
return buildClass(properties, listOfFiles, generatedClassData.className, generatedClassData.classPackage, includedDirectoryRelativePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extension that should be appended to the generated test class. E.g. {@code .java} or {@code .php}
|
||||
*
|
||||
* @param properties - properties passed to the plugin
|
||||
*/
|
||||
String fileExtension(ContractVerifierConfigProperties properties)
|
||||
String fileExtension(ContractVerifierConfigProperties properties);
|
||||
|
||||
class GeneratedClassData {
|
||||
public final String className;
|
||||
public final String classPackage;
|
||||
public final java.nio.file.Path testClassPath;
|
||||
|
||||
public GeneratedClassData(String className, String classPackage,
|
||||
java.nio.file.Path testClassPath) {
|
||||
this.className = className;
|
||||
this.classPackage = classPackage;
|
||||
this.testClassPath = testClassPath;
|
||||
}
|
||||
}
|
||||
}</programlisting>
|
||||
<simpara>Again, you must provide a <literal>spring.factories</literal> file, such as the one shown in the following
|
||||
example:</simpara>
|
||||
|
||||
Reference in New Issue
Block a user