Part 2 - Basic of mocking with Moq(blog.decayingcode.com)

submitted by arch4ngelarch4ngel(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.

add a comment |category: |Views: 56

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story