Part 2 - Basic of mocking with Moq(blog.decayingcode.com)
submitted by
arch4ngel(585) 3 years, 3 months ago
As every mocking framework, except TypeMock which can perform differently, every mocked class can't be sealed and methods that need to be mocked need to be public. If the class is not inheriting from an interface, the method that are being mocked need to be virtual.
Once this is cleared... let's show a simple example of a Product having it's price calculated with a Tax Calculator.
|category: Unit Testing
|Views: 56
tags:
mocking Moq Framework Testing another
Everyones tags:
Your Tags: