From 1c0d4e56cf6739f652468c8abda1b02f5aa4f4c5 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 28 Aug 2017 10:02:13 +0200 Subject: [PATCH] Added more documentation to the byCommand assertion; #299 --- docs/src/main/asciidoc/verifier/contract.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/main/asciidoc/verifier/contract.adoc b/docs/src/main/asciidoc/verifier/contract.adoc index c249efb6ae..cb0d5f48b8 100644 --- a/docs/src/main/asciidoc/verifier/contract.adoc +++ b/docs/src/main/asciidoc/verifier/contract.adoc @@ -560,6 +560,11 @@ assertions and the one from matchers with an `and` section): assertThatValueIsANumber(parsedJson.read("$.duck")); ---- +IMPORTANT: Notice that for the `byCommand` method we are calling the `assertThatValueIsANumber`. This method needs +to be defined in the test base class or should be statically imported to your tests. +Notice that the `byCommand` call was converted to `assertThatValueIsANumber(parsedJson.read("$.duck"));`. That means +that we took the method name and passed the proper JSON path as a parameter to it. + and the WireMock stub like this: [source,json,indent=0]