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

index c97432b..0e43145 100644 (file)
@@ -34,7 +34,10 @@ public class ContractTest
             {
               body.arrayContaining("actions", actions ->
               {
-                actions.stringType("foo");
+                actions.object(object ->
+                {
+                  object.stringType("foo");
+                });
               });
             }).build())
         .toPact();
index d14b5d0..1b63847 100644 (file)
       "response": {
         "body": {
           "actions": [
-            "foo"
+            {
+              "foo": "string"
+            }
           ]
         },
+        "generators": {
+          "body": {
+            "$[0].foo": {
+              "size": 20,
+              "type": "RandomString"
+            }
+          }
+        },
         "headers": {
           "Content-Type": "application/vnd.siren+json"
         },
                   "variants": [
                     {
                       "generators": {
-
+                        "$.foo": {
+                          "size": 20,
+                          "type": "RandomString"
+                        }
                       },
                       "index": 0,
                       "rules": {
-                        "$": {
+                        "$.foo": {
                           "combine": "AND",
                           "matchers": [
                             {