From: Kai Moritz Date: Sat, 21 May 2022 15:29:35 +0000 (+0200) Subject: WIP X-Git-Tag: wip-umbau-array-contains~12 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=22c9dfa1b5034c66dcce3dbbb74551c40cdb2e03;p=demos%2Fexample-siren WIP --- diff --git a/spring-consumer/src/test/java/de/juplo/demos/pact/ContractTest.java b/spring-consumer/src/test/java/de/juplo/demos/pact/ContractTest.java index dd2e149..2e89474 100644 --- a/spring-consumer/src/test/java/de/juplo/demos/pact/ContractTest.java +++ b/spring-consumer/src/test/java/de/juplo/demos/pact/ContractTest.java @@ -32,15 +32,6 @@ public class ContractTest .headers(Map.of("Content-Type", "application/vnd.siren+json")) .body(LambdaDsl.newJsonBody(body -> { - body.arrayContaining("actions", actions -> - { - actions.object(object -> - { - object.stringValue("name", "update"); - object.stringValue("method", "PUT"); - - }); - }); }).build()) .toPact(); } diff --git a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json index 2ae8cea..323956d 100644 --- a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json +++ b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json @@ -11,65 +11,11 @@ }, "response": { "body": { - "age": 100, - "happy": true, - "id": 1234567890, - "localAddress": "127.0.0.1", - "name": "string" - }, - "generators": { - "body": { - "$.id": { - "max": 2147483647, - "min": 0, - "type": "RandomInt" - }, - "$.name": { - "size": 20, - "type": "RandomString" - } - } + }, "headers": { "Content-Type": "application/vnd.siren+json" }, - "matchingRules": { - "body": { - "$.happy": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.id": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.localAddress": { - "combine": "AND", - "matchers": [ - { - "match": "regex", - "regex": "(\\d{1,3}\\.)+\\d{1,3}" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } - } - }, "status": 200 } },