From: Kai Moritz Date: Sat, 21 May 2022 17:16:21 +0000 (+0200) Subject: WIP X-Git-Tag: wip-umbau-array-contains~4 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=e501ce1146a39908c7b9b93869552fc6c6c88812;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 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)$" } ] },