contract-testing-demo

pact and java contract testing with micro-commits

git clone https://9o.is/git/contract-testing-demo.git

commit 6ad577e8d0d049173e99dd21615ba8948e743c27
parent 0b12f383d339910baa96709406de63a42b56dd92
Author: Jul <jul@9o.is>
Date:   Wed, 26 Jun 2019 14:51:11 -0400

Create an alligator instance with its name

Error:
java.lang.AssertionError:
      0 - $.name -> [{mismatch=Expected 'Mary' but received null,
diff=}]

Diffstat:
Mconsumer-driven/animal-service/src/main/java/app/alligator/AlligatorController.java | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/consumer-driven/animal-service/src/main/java/app/alligator/AlligatorController.java b/consumer-driven/animal-service/src/main/java/app/alligator/AlligatorController.java @@ -1,13 +1,14 @@ package app.alligator; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; @RestController public class AlligatorController { @GetMapping("/alligators/{name}") - public Alligator getByName() { - return new Alligator(null); + public Alligator getByName(@PathVariable String name) { + return new Alligator(name); } }