Browse by Tags

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. This one is not new for users of moq-contrib , but we decided to move this to the core Moq library as we get the question...
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. Recursive mocks Quite often you have a root mock object from which other mocks should "hang" through property...
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...
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...
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...
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
Today, the MoQ API lets you setup expectations and later verify them, like so: [ Fact ] public void FillingRemovesInventoryIfInStock() { //arrange/setup var order = new Order (TALISKER, 50); var mock = new Mock < IWarehouse >(); //setup - expectations...
More Posts

Search

Go

This Blog

News

     

      Microsoft MVP Profile

Syndication