For a while now I’ve been trying to figure out a good way of using unit testing to validate more of my code with ASP.NET applications.
Most of our applications correspond to the n-tier model with the data-layer and business objects separated from the presentation layer.
I’m still trying to find a good solution, but I think that some of these new ideas might help once I get my head around all the concepts.
Mock objects seem like they can play a part, especially when you want to test something in isolation from the other layers (eg. testing the code that calls the data layer, without actually depending on the data layer to be all correct and available). Rhino Mocks is the mock object framework I’m trying out at the moment.
Finally, the Model-View-Presenter design pattern might be a way of hooking this all up together. Billy McCafferty outlines his ASP.NET architecture and also has published an artile on using MVP with ASP.NET. Phil Haack also illustrates using the Supervising Controller pattern (an update on the MVP pattern) with ASP.NET.
Then again, I could have it all mixed up, but I do think some of these techniques are going to be valuable tools - a pity that the learning curve is reasonably steep at the moment.
While the official Canada Day might 1st July, last Wednesday was the next best thing
It was my birthday, and I got given the new Serena Ryder CD - “If your memory serves you well”.
She’s a young Canadian singer that first came to my attention while watching RocKiz on the motel tv at Wagga Wagga while attending CodeCamp last month. I’ve never seen the show before as our SBS reception is virtually non-existant at home (lots of snow!). Anyway, she not only had a very good knowledge of music trivia, but has a really nice voice.
The other Canadian event was the birth of my cousin Toby’s son Tiernan (technically this was on the 17th, but I’m sure we can work something out with timezones!). Toby and his wife Jen live in Canada, and this is their first child. Congratulations to all concerned.
Looks like Beta 1 of Orcas is out. Here are the links.