Updated description of byType testMatcher (#394)

fixes #393
This commit is contained in:
WhyINeedToFillUsername
2017-08-28 16:27:03 +02:00
committed by Marcin Grzejszczak
parent 49df7bf472
commit 08f20afd91

View File

@@ -480,7 +480,8 @@ match the regex for ISO Time
- `byType()` - the value taken from the response via the provided JSON Path needs to
be of the same type as the type defined in the body of the response in the contract.
`byType` can take a closure where you can set `minOccurrence` and `maxOccurrence`.
That way you can assert on the size of the collection.
That way you can assert on the size of the flattened collection. To check the size
of an unflattened collection, use a custom method via `byCommand(...)` testMatcher.
- `byCommand(...)` - the value taken from the response via the provided JSON Path will be
passed as an input to the custom method that you're providing. E.g. `byCommand('foo($it)')`
will result in calling a `foo` method to which the value matching the JSON Path will get
@@ -1199,4 +1200,4 @@ IMPORTANT: If you don't provide any implementation then the default one will be
If you provide `repositoryRoot` property or `workOffline` flag then Aether based
that will download stubs from a remote repo will be picked. If you don't provide these
values then the `ClasspathStubProvider` will be picked that will scan the classpath.
If you provide more than one, then the first one on the list will be picked.
If you provide more than one, then the first one on the list will be picked.