Updated docs

This commit is contained in:
Marcin Grzejszczak
2016-04-24 22:11:24 +02:00
parent 26afe17ec5
commit 4907624bbe
4 changed files with 8 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ Example of usage in Spock tests:
[source,groovy,indent=0]
----
include::src/test/groovy/io/codearte/accurest/stubrunner/junit/AccurestRuleSpec.java[tags=classrule]
include::src/test/groovy/io/codearte/accurest/stubrunner/junit/AccurestRuleSpec.groovy[tags=classrule]
----
Example of usage in JUnit tests:

View File

@@ -23,14 +23,14 @@ public class AccurestRuleJUnitTest {
System.getProperties().setProperty("stubrunner.stubs.classifier", "stubs");
}
// tag:classrule[]
// tag::classrule[]
@ClassRule public static AccurestRule rule = new AccurestRule()
.repoRoot(repoRoot())
.downloadStub("io.codearte.accurest.stubs", "loanIssuance")
.downloadStub("io.codearte.accurest.stubs:fraudDetectionServer");
// end:classrule[]
// end::classrule[]
// tag:test[]
// tag::test[]
@Test
public void should_start_wiremock_servers() throws Exception {
// expect: 'WireMocks are running'
@@ -46,7 +46,7 @@ public class AccurestRuleJUnitTest {
then(httpGet(rule.findStubUrl("loanIssuance").toString() + "/name")).isEqualTo("loanIssuance");
then(httpGet(rule.findStubUrl("fraudDetectionServer").toString() + "/name")).isEqualTo("fraudDetectionServer");
}
// end:test[]
// end::test[]
private static String repoRoot() {
try {

View File

@@ -18,7 +18,7 @@ class AccurestRuleSpec extends Specification {
System.getProperties().setProperty("stubrunner.stubs.classifier", "stubs");
}
// tag:classrule[]
// tag::classrule[]
@ClassRule @Shared AccurestRule rule = new AccurestRule()
.repoRoot(AccurestRuleSpec.getResource("/m2repo").toURI().toString())
.downloadStub("io.codearte.accurest.stubs", "loanIssuance")
@@ -38,5 +38,5 @@ class AccurestRuleSpec extends Specification {
"${rule.findStubUrl('loanIssuance').toString()}/name".toURL().text == 'loanIssuance'
"${rule.findStubUrl('fraudDetectionServer').toString()}/name".toURL().text == 'fraudDetectionServer'
}
// end:classrule[]
// end::classrule[]
}

View File

@@ -17,5 +17,5 @@ for the following configuration file:
[source,yml,indent=0]
----
include::src/test/resources/application.yml[tags=test]
include::src/test/resources/application.yml[]
----