Creating Your Own Fakes Instead of Using Mocking Libraries
Read OriginalThis technical article discusses unit testing in C#/.NET, advocating for writing custom fake objects (stubs/mocks) instead of using libraries like Moq or NSubstitute. It covers the benefits (no 3rd-party dependencies, transparency, flexibility), explains key terminology (fake, stub, mock, shim), and provides practical code examples for creating and using a fake service in a test scenario.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet