Should you only mock types you own?

My answer is “no”. You should mock anything that makes sense in the context of a given unit test. It should not matter if you “own” the mocked type or not. These days, in a Java or .NET environment everything (and I really mean everything) can be easily mocked. So, there is no technical reason … Read more

Swagger/OpenAPI mock server

An easy way to create simple mock from an OpenAPI (fka Swagger) spec without code is to use a tool call prism available at http://github.com/stoplightio/prism written in Typescript. This command line is all you need: ./prism run –mock –list –spec <your swagger spec file> The mock server will return a dynamic response based on the … Read more