By tag: Moq
0
kicks
Using Mocking Framework - Moq
This post will tell how to incorporate one of the popular & free object mocking framework, Moq in your unit tests.
0
kicks
Auto-mocking hierarchies (a.k.a. recursive mocks) with Moq
In this post I will show how the auto-mocking hierarchies (a.k.a. recursive mocks) feature of Moq can greatly simplify your unit tests.
0
kicks
Mocking - VISUG session (screencast)
Abstract: "This session provides an introduction to unit testing using mock objects. It builds a small application using TDD (test driven development). To enable easier unit testing, all dependencies are removed from code and introduced as mock objects. Afterwards, a mocking framework by the na...
0
kicks
Mocking - VISUG session
Thursday evening, I did a session on Mocking for the VISUG (Visual Studio User Group Belgium). As promised, here is the slide deck I’ve used. The session will be available online soon, in the meantime you'll have to go with the slide deck.
0
kicks
Beginning Mocking With Moq 3 - Part 2
Beginners introduction to mocking using the recently released Moq 3 framework.
0
kicks
Beginning Mocking With Moq 3 – Part 1
A intro to mocking using the newly release Moq 3 framework.
0
kicks
Part 3 – Advanced mocking functionalities of Moq
When you have some simple scenario like “when the method “GetTax” is called, return 5$” it’s a simple scenario that a lot of mockers will see. However, there is some rarer scenario that people will wonder how to do it.
One of those scenario is with event handlers.
0
kicks
Part 2 - Basic of mocking with Moq
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...
0
kicks
Part 1 - Introduction to Moq
This is the first post of a serie on mocking with Moq. I'll be giving a conference a .NET Montreal Community on February 25th and I though there it would be good reference to anyone attending the @Lunch event.
0
kicks
Mocking ASP.NET MVC HtmlHelper using Moq
HtmlHelper is used quite frequently in ASP.MVC. It has a number of dependencies, so testing the numerous extension methods on it (both default, and added) can make for some ugly code. This simple code sample shows how to mock out the dependencies (ViewContext for one) using Moq.
0
kicks
MoQs Rox
My first impressions of the MoQ object mocking framework... Hell, my impressions with the first mocking framework I've ever used. tl;dr: Niiiiiice.
0
kicks
Moq: Why do we need yet another NET mocking framework?
"I've already argued in the past why I think forcing regular developers to learn and understand the difference between a stub, a fake, a "true" mock and a dynamic mock is unproductive and largely irrelevant for their TDD needs.
Also, even though quite common in the mocking communit...