Mocks

Twin Cities Code Camp 7

This Saturday, Twin Cities Code Camp 7! I’ll be presenting on the awesome ASP.NET MVC and Spark View Engine implementation. Come on down, its free! Don’t forget to register on the Code Camp website. :) See you there.

 

* The text below was shamelessly stolen from Chris G Williams Blog. I couldnt say it any better so I figured I’d copy it :) Thanks Chris:

Just like last year, we’re holding this event at the U of M, so be sure to show up early since parking fills up quickly.

Also, there’s no free lunch this time, but there are LOTS of great places to go eat in the area, and we will be putting together a cash-only Jimmy Johns order for anyone interested. Exact change is appreciated and anything extra will be used as a tip, so break those $20s at Starbucks before you get to Code Camp.

We’ll also have a community table this year, so if you’re interested in the local user group scene, or maybe already a part of it, stop on by and see what’s going on.

Materials from HDC09 – Testing With Mocks Talk

Below is a link to download the Testing With Mocks lightning round talk that I gave at the Heartland Developers Conference this last week.

In order to get the samples to run you will need to have TypeMock Isolator installed. If you do not own a license you can download an evaluation for free here.

The download includes full buildable source and the presentation.

Download: TestingWithMocks_HDC09.zip (~15MB)

TypeMock 5.3.5 – WasCalledWithArguments

I normally do not blog bile by reposting another sites news, but this news is rather importnat in regards to TDD with Isolator.

I use Rhino Mocks 80% of the time for mocking, but that last 20% is Isolator. Why 20% – this is the real tough stuff to test. SharePoint, Silverlight, Tightly Coupled Legacy code (that I do not have source to), etc. In Rhino I’ve been able to assert with arguments for quite awhile now. Isolator did not fully support this, they do now!

See this release notice here: http://blog.typemock.com/2009/09/typemock-isolator-535-is-out.html

What does this mean? It means that you can assert whether or not arguments made to a particular mocked object were what you expect them to be. Perpaps. If they are not, then your test should fail. If your method performs various manipulations through various other calls, you can ensure that through the execution stack of your app, your calls are being made with what you expect them to be. If not, tests fail.

 

Fail fast is the name of the game and Isolator just stepped up theirs. Good stuff guys.

Featured in the Spaghetti Code Podcast

I was recently interviewed on the Spaghetti Code Podcast, hosted by Microsoft’s Jeff Brand.

Jeff and I talked about Mocking and how it relates to the development process, testing process and your day to day coding.

You can download the files from the SlickThought website here or from ITunes here.

* I’m not sure if ITunes has updated yet, but it should be up there soon.

Twin Cities Code Camp 6 – Testing with Mocks – Code and Presentation

As I stated in the session “Testing with Mocks”, I would post the code and presentation to this blog.

Download the code and the presentation as a zip file below.

Thank you for coming to the talk! If you have any questions please let me know.

*NOTE* You will need to install TypeMock Isolator for the TypeMock tests to work.

Download

TestingWithMocks.zip (~13.3MB)