From ff7842de1d2ba20877a84835f688d7e85452339f Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 22 May 2022 07:42:00 +0200 Subject: [PATCH] Further aligned the contracts: name and method are named exactly alike now --- .../de/juplo/demos/pact/ContractTest.java | 8 ++--- .../SpringConsumer-SirenOrderProvider.json | 32 ------------------- 2 files changed, 4 insertions(+), 36 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 a148b60..6fa8b5a 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 @@ -66,14 +66,14 @@ public class ContractTest { actionsArray.object(object -> { - object.stringType("name","update"); - object.stringType("method", "PUT"); + object.stringValue("name","update"); + object.stringValue("method", "PUT"); object.matchUrl2("href", "orders", Matchers.regexp("\\d+", "1234").getValue()); }); actionsArray.object(object -> { - object.stringType("name","delete"); - object.stringType("method", "DELETE"); + object.stringValue("name","delete"); + object.stringValue("method", "DELETE"); object.matchUrl2("href", "orders", Matchers.regexp("\\d+", "1234").getValue()); }); }); diff --git a/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json b/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json index d666dde..27ff970 100644 --- a/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json +++ b/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json @@ -138,22 +138,6 @@ "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$" } ] - }, - "$.method": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] } } }, @@ -175,22 +159,6 @@ "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$" } ] - }, - "$.method": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] } } } -- 2.20.1