Reputation: 4293
I am using cucumber to run acceptance tests.
I am using the following Zendesk
library to call methods to create tickets, and view them
https://github.com/nukosuke/go-zendesk
I want to know while writing acceptance tests how to mock this library. I am using dependency injection design to test this on a unit test case. But I don't know how I can mock it while acceptance tests.
I know that in case of acceptance tests, you should actually run it without mocking, but let's say that there is cost associated with this zendesk api for now, and I don't want to actually call zendesk api behind the scenes.
How can i mock the library here?
Thanks
Upvotes: 1
Views: 159
Reputation: 46562
You cannot mock a library or module or package, you can only mock a type.
Mocking any type works the same way:
Upvotes: 1