Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 545 Bytes

README.md

File metadata and controls

11 lines (8 loc) · 545 Bytes

Mocking the SDK Client

In order to mock the instance of sdk.Client in your project, while possible to do manually, we recommend using mockgen.

Define the interface you want to accept for sdk.Client within your project. If you're using any of the API endpoint's methods, like sdk.Client.Objects, you'll need to mock these interfaces as well.

The example Go module within this directory demonstrates how to use mockgen to generate mocks for sdk.Client and verify a function for fetching Projects.