Contents tagged with Moq
-
Automocking container with Moq
-
Where was the stubbing part in Moq?
In my very recent previous post I said "mocking and stubbing easier than ever", but actually forgot to mention the stubbing part :S.
-
Mocking and stubbing easier than ever with Moq 2.6
I've just released a new version of Moq which contains a few bug fixes but two extremely useful features: recursive mocks and mocked default values.
-
Do you really care about Stub vs Mock?
I've argued in the past that this theoretical discussion is utterly useless. In my experience you need slightly different things from your test doubles at different times and depending on the scenarios and what you care about testing in a particular test.
-
Mocking protected members with Moq
If you're familiar with Moq, you know that it relies on lambda expressions heavily. This is very good as you get full support from intellisense and refactoring features in Visual Studio. However, it also means you're for the most part restricted to setting expectations on things that your code has access too (public or internal members).
-
Moq 2.5 shipped: lots of good news!
Today we shipped Moq v2.5. It's been a while since RC1 (a month or so feels so long for an open source agile project!) and we god very good feedback and suggestions for the final release. I'm pretty happy with the current drop and felt it was time for a new stable release.
-
A practical example on how to mock static classes without TypeMock
WCF is the second biggest framework after ASP.NET that sooner or later forces you to use a static "context" property to do anything beyond the trivial stuff. ASP.NET has the HttpContext.Current, whereas WCF has the WebOperationContext.Current for example.
-
Improving MoQ to allow arrange-act-assert testing style
-
New Moq features for mock verification and creation
I wrote before about What's wrong with the Record/Reply/Verify model for mocking frameworks, and in that context, why Moq didn't provide a mock verification functionality.