Skip to content

ptrthomas/payment-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ This demo / sample project has been moved under the Karate repo. Check here for the latest: https://github.com/intuit/karate/tree/develop/examples/consumer-driven-contracts

Karate Consumer Driven Contracts Demo

References

This is a simplified version of the example in the Karate test-doubles documentation - with JMS / queues removed and simplified to be a stand-alone maven project.

Also see The World's Smallest Microservice.

Instructions

  • clone the project
  • mvn clean test

Main Artifacts

File Description Comment
PaymentService.java Producer A very simple Spring Boot app / REST service
payment-contract.feature Contract + Functional Test Karate API test
PaymentContractTest.java Producer Integration Test JUnit runner for the above
payment-mock.feature Mock / Stub Karate mock that perfectly simulates the Producer !
PaymentContractAgainstMockTest.java Verify that the Mock is as per Contract JUnit runner that points payment-contract.feature --> payment-mock.feature
Consumer.java Consumer A simple Java app that calls the Producer to do some work
ConsumerIntegrationTest.java Consumer Integration Test A JUnit full integration test, using the real Consumer and Producer
ConsumerIntegrationAgainstMockTest.java Consumer Integration Test but using the Mock Like the above but using the mock Producer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published