Skip to content

How to properly mock an API in testing? #393

Discussion options

You must be logged in to vote

I've extended TestBase.cs and Testing.cs. Here's an example of mocking IEmailSender:

https://gist.github.com/ronnieholm/7c97b09097c44a3c33a7f36c0d053fff

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@fakhrulhilal
Comment options

Answer selected by MichaelHochriegl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #390 on July 29, 2021 02:21.