Skip to content

Commit

Permalink
updated readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Oct 8, 2014
1 parent 499a4af commit fe9c8ab
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion pact-jvm-consumer-junit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The library is available on maven central using:

* group-id = `au.com.dius`
* artifact-id = `pact-jvm-consumer-junit_2.11`
* version-id = `2.0.8`
* version-id = `2.1.0`

##Usage

Expand Down Expand Up @@ -168,6 +168,24 @@ You can define as many interactions as required. Each interaction starts with `u
The test state setup with `given` is a mechanism to describe what the state of the provider should be in before the provider
is verified. It is only recorded in the consumer tests and used by the provider verification tasks.

### Building JSON bodies with PactDslJsonBody DSL

The body method of the ConsumerPactBuilder can accept a PactDslJsonBody, which can construct a JSON body as well as
define regex and type matchers.

For example:

```java
PactDslJsonBody body = new PactDslJsonBody()
.stringType("name")
.booleanType("happy")
.hexValue("hexCode")
.id()
.ipAddress("localAddress")
.numberValue("age", 100)
.timestamp();
```

## Debugging pact failures

When the test runs, Pact will start a mock provider that will listen for requests and match them against the expectations
Expand Down
2 changes: 1 addition & 1 deletion pact-jvm-provider-sbt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The sbt plugin adds an sbt task for running all provider pacts against a running

To use the pact sbt plugin, add the following to your project/plugins.sbt

addSbtPlugin("au.com.dius" %% "pact-jvm-provider-sbt" % "2.0.6")
addSbtPlugin("au.com.dius" %% "pact-jvm-provider-sbt" % "2.1.0")

and the following to your build.sbt

Expand Down

0 comments on commit fe9c8ab

Please sign in to comment.