From 0957e8787f764d1d8d58aa391641055ad9c47472 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 21 May 2022 17:54:39 +0200 Subject: [PATCH] WIP --- .../test/java/de/juplo/demos/pact/ContractTest.java | 13 ++++++++----- .../pacts/SpringConsumer-Siren Order Provider.json | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) 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 0e62c48..d500fa5 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 @@ -33,13 +33,16 @@ public class ContractTest .headers(Map.of("Content-Type", "application/vnd.siren+json")) .body(LambdaDsl.newJsonBody(body -> { - body.arrayContaining("actions", actions -> + body.array("entities", entities -> { - actions.object(object -> + body.arrayContaining("actions", actions -> { - object.stringType("name","update"); - object.stringType("method", "PUT"); - object.matchUrl2("href", Matchers.regexp("\\d+", "1234")); + actions.object(object -> + { + object.stringType("name","update"); + object.stringType("method", "PUT"); + object.matchUrl2("href", Matchers.regexp("\\d+", "1234")); + }); }); }); }).build()) diff --git a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json index a325ecb..7a05c08 100644 --- a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json +++ b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json @@ -17,6 +17,9 @@ "method": "PUT", "name": "update" } + ], + "entities": [ + ] }, "generators": { -- 2.20.1