When writing unit tests, you can use Mocks to simulate the usage of class dependencies. Even though some developers are harshly against the usage of mocks, they can be useful, especially when the mocked operation does not return any value, but still,...

Markdown supported · ⌘↵ to post
Davide Bellone
Principal backend developer | Content Creator | Microsoft MVP
Special thanks to Moke who found an error in the last example.