Skip to content

jfnavin/patterns-for-mocking-apis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patterns for mocking APIs

This repo is a companion to the blog post.

It contains working Java code samples for four patterns of mocking an API:

  1. Mocking the API client
  2. Mocking HTTP calls within a unit test
  3. Using a mocked API class to move HTTP mocks out of the unit test
  4. Using a mocked API in conjunction with validation against the OpenAPI spec

See src/test/java for the examples.

About

Code samples of mocking APIs written in Java to accompany the blog post.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors