Category Archives: Mocking

The usefulness of interaction tests, or “How to question the method”

More and more often these days, I’ve been having a crisis of faith conscience when it comes to TDD, or rather, interaction testing in general. It happens more so on projects where I’m the only developer or there is a … Continue reading 

Also posted in TDD | 10 Comments

Rhino.Mocks Performance Issue Fixed

Just wanted to quickly note that I tracked down the performance issue in Rhino.Mocks and patched it. I also updated the original post with the new numbers. Enjoy!

Also posted in Brownfield, Featured | 2 Comments

Mock Framework Benchmarks

UPDATE: I tracked down the issue and committed a patch to Rhino.Mocks. Rhino.Mocks is now much more competetive performance wise, our CI build time nearly halved, and about 4 minutes out of 7 of our test time has disappeared. New … Continue reading 

Also posted in Refactoring, Utilities | 6 Comments

Mocking Events

Currently in Rhino.Mocks, making mocks fire events and ensuring that an event on your SUT was fired are both awkward and verbose at best. Here is an example of both things at once: [Test] public void ViewFiresBeginDrag_Always_FiresChangedEvent() { IEventRaiser raiser; … Continue reading 

Also posted in Coding Style, ReSharper | 1 Comment

Separate Stub and Verify != Duplicate code necessarily

Daniel Cazzulino, author of Moq posted a good comment on my last post where I suggested looking into a Mockito like syntax for .NET Mock Frameworks. On the surface, Mockito’s approach seems good. But if you do the “true” comparison, … Continue reading 

Also posted in Refactoring, TDD | 2 Comments

The Past, Present and Future (?) of Mocking

(Note: I’m going to speak about .NET mock projects here for the most part, but most of them have Java quasi-equivalents.) The original mocking frameworks like NMock required you to setup expectations by passing strings for method names. This was … Continue reading 

Also posted in Refactoring | 3 Comments

AutoMockingContainer and ASP.NET MVC: Round 2

Many thanks to honorary hillbilly, Aaron Jensen for both nudging me into helping out when I lamented on the AutoMockingContainer/ASP.NET MVC combination and for helping me through my first official patch submission to an open source project. He was very … Continue reading 

Also posted in ASP.NET MVC | 2 Comments

Upcoming speaking engagements

Floridians beware! The Hillbilly descends on your fair state in the next few weeks: FlaDotNet – West Palm Beach, January 22, 2008   6:30pm Introducing MVC in .NET OnLoad, OnPreRender, OnRender, OnInit. Traditional web forms development makes it sound like you’re … Continue reading 

Also posted in ASP.NET MVC, Brownfield, Presenting, TDD | 2 Comments

AutoMockingContainer and ASP.NET MVC: Round 1

I resolved to pace myself a little better in ’08 on this blog. But then, I also resolved not to keep any of my resolutions. Mostly because I like the circular reference. I’m delving a little more deeply into the … Continue reading 

Also posted in ASP.NET MVC | 1 Comment