Skip to content
Ronald Holshausen edited this page Jul 4, 2015 · 10 revisions

Matching requests and responses with Pact-JVM

To understand the basic rules of matching, see Matching Gotchas. For example test cases for matching, see the Pact Specification Project, version 2.

By default, Pact-JVM will use string equality matching following Postel's Law. This means that for an actual value to match an expected one, they both must consist of the same sequence of characters. For collections (basically Maps and Lists), they must have the same elements that match in the same sequence, with cases where the additional elements in the actual collection are ignored.

Matching Bodies

Matching Paths

Matching Queries

Matching Headers

Matching Status Codes

Clone this wiki locally