Sync docs from 1.0.x to gh-pages
This commit is contained in:
@@ -1704,6 +1704,19 @@ public void shouldBeRejectedDueToAbnormalLoanAmount() {
|
|||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<p>As consumers we need to define what exactly we want to achieve. We need to formulate our expectations. That’s why we write the following contract.</p>
|
<p>As consumers we need to define what exactly we want to achieve. We need to formulate our expectations. That’s why we write the following contract.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="admonitionblock important">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="icon">
|
||||||
|
<div class="title">Important</div>
|
||||||
|
</td>
|
||||||
|
<td class="content">
|
||||||
|
We’re placing the contract under <code>src/test/resources/contract/fraud</code> folder. The <code>fraud</code> folder
|
||||||
|
is important cause we’ll reference that folder in the producer’s test base class name.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre class="highlight"><code class="language-groovy" data-lang="groovy">package contracts
|
<pre class="highlight"><code class="language-groovy" data-lang="groovy">package contracts
|
||||||
@@ -2048,7 +2061,7 @@ git pull https://your-git-server.com/server-side-fork.git contract-change-pr</co
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<p>In the configuration of the Maven plugin we passed the <code>baseClassForTests</code> property</p>
|
<p>In the configuration of the Maven plugin we passed the <code>packageWithBaseClasses</code> property</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -2063,8 +2076,25 @@ git pull https://your-git-server.com/server-side-fork.git contract-change-pr</co
|
|||||||
</plugin></code></pre>
|
</plugin></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="admonitionblock important">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="icon">
|
||||||
|
<div class="title">Important</div>
|
||||||
|
</td>
|
||||||
|
<td class="content">
|
||||||
|
We’ve decided to use the "convention based" naming by setting the <code>packageWithBaseClasses</code> property.
|
||||||
|
That means that 2 last packages will be combined into a name of the base test class. In our case the contracts
|
||||||
|
were placed under <code>src/test/resources/contract/fraud</code>. Since we don’t have 2 packages starting from the <code>contracts</code>
|
||||||
|
folder we’re picking only one which is <code>fraud</code>. We’re adding the <code>Base</code> suffix and we’re capitalizing <code>fraud</code>.
|
||||||
|
That gives us the <code>FraudBase</code> test class name.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<p>That’s because all the generated tests will extend that class. Over there you can set up your Spring Context or whatever is necessary. In our case we’re using <a href="http://rest-assured.io/">Rest Assured MVC</a> to start the server side <code>FraudDetectionController</code>.</p>
|
<p>That’s because all the generated tests will extend that class. Over there you can set up your Spring Context or
|
||||||
|
whatever is necessary. In our case we’re using <a href="http://rest-assured.io/">Rest Assured MVC</a> to start the server side <code>FraudDetectionController</code>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
Reference in New Issue
Block a user