From e501ce1146a39908c7b9b93869552fc6c6c88812 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 21 May 2022 19:16:21 +0200 Subject: [PATCH] WIP --- .../test/java/de/juplo/demos/pact/ContractTest.java | 2 +- .../pacts/SpringConsumer-Siren Order Provider.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 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 85d40b0..91b8f65 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 @@ -40,7 +40,7 @@ public class ContractTest { object.stringType("name","update"); object.stringType("method", "PUT"); - object.matchUrl2("href", Matchers.regexp("\\d+", "1234")); + object.matchUrl2("href", Matchers.regexp("\\d+", "1234").getValue()); }); }); }); diff --git a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json index aa58b36..ac6731a 100644 --- a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json +++ b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json @@ -13,7 +13,7 @@ "body": { "actions": [ { - "href": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)", + "href": "http://localhost:8080/1234", "method": "PUT", "name": "update" } @@ -25,8 +25,8 @@ "generators": { "body": { "$[0].href": { - "example": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)", - "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$", + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", "type": "MockServerURL" } } @@ -45,8 +45,8 @@ { "generators": { "$.href": { - "example": "http://localhost:8080/RegexpMatcher(regex=\\d+, value=1234)", - "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$", + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", "type": "MockServerURL" } }, @@ -57,7 +57,7 @@ "matchers": [ { "match": "regex", - "regex": ".*\\/(\\QRegexpMatcher(regex=\\d+, value=1234)\\E)$" + "regex": ".*\\/(\\Q1234\\E)$" } ] }, -- 2.20.1