Yet another reason to love TestDriven.net

As I was coding some new tests for the container integration part of OpenRasta (which, since beta 2 changes, has become much more complicated…), I discovered a feature I didn’t even realize was there.

I use abstract test classes so that each container that OpenRasta supports automatically gains any new tests that verify the behaviour of the container matches OR’s expectations. In an abstract test, the test class that contains the test is marked abstract, and you inherit from that class for each specific set of tests you can run. I’ve used that trick for a long time, and was one of the main reasons why I didn’t like MSTest much, as it seems the guys in Redmond didn’t support that scenario.

So here I was, coding away in an abstract class, and frenetically executing the test as I added code (something I remapped to Ctrl+T, T). Then it dawned on me that I was attempting to execute the abstract class. But surely, an abstract class can’t be instantiated I told myself.

And then I realized what was happening. TD.net was simply executing the concrete classes inheriting from my test class. Sweet.

PS: I have no idea if it’s the runner or nunit, and have no idea either if other runners will or won’t execute this scenario. It just works and that makes me happy :)

Ads

My MVC Best Practices talk

I’ve given that talk in quite a few places, and always promise to post the slides on my blog. But in fact, I was secretly waiting for the VistaSquad video to be released.

Thanks to Ian Smith, you can now see it all, complete with slides and excessive arm waving.

Vista Squad: MVC Best Practices By Ian Smith
View in HD  Download Version  Visit Ian Smith's ExposureRoom Videos Page

Ads

London AltNetBeers #8 – 12th of May, Back to the pub

The next AltNetBeers is going to be on the 12th of May!

Drinks and food will be provided by our two sponsors, SkillsMatter and ThoughtWorks, big thanks to them for helping our community strive!

We’re moving venue for a while, and we’ll be organizing this one at the GlassHouse, on 55 Brewer Street.


View Larger Map

So we can plan ahead, please register for the event at http://ukdotnet.ning.com/events/london-altnetbeers-8

Ads