WIP
authorKai Moritz <kai@juplo.de>
Sat, 21 May 2022 17:16:21 +0000 (19:16 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 21 May 2022 17:16:21 +0000 (19:16 +0200)
spring-consumer/src/test/java/de/juplo/demos/pact/ContractTest.java
spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json

index 85d40b0..91b8f65 100644 (file)
@@ -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());
                   });
                 });
               });
index aa58b36..ac6731a 100644 (file)
@@ -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)$"
                             }
                           ]
                         },