Geeks With Blogs

News

Search this blog (Google)


Louis Haussknechts' Blog Louis' adventures in .Net

Last Friday I met my old friend Hannes Pavelka. We had some beer in a really nice pub here in Dortmund (Limericks ) as he talked about unit testing in his current project. They use NUnit throughout the whole developing process. The biggest problem though is that they do not write their test before implementing, because it is to time consuming!

There are different approaches to replace existing API for testing and avoid calling resource intensive objects. One is called "mocking", the other is known as "stubbing". While mocking mimics a specific behavior and expects various actions stubbing only decouples time-consuming actions such as database queries.

Look at an Martin Fowler's article on mocks and stubs here for more information.

As you can see, you should use mock components. The main drawback is that this is a very time-consuming work to create them. For this purpose Ayende Rahien developed his Mock Object Framework Rhino Mocks. It's really worth taking a look at it, because it simplifies life as a developer.

Posted on Tuesday, August 16, 2005 5:18 AM | Back to top


Comments on this post: Unit test in reality...

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Louis Hau├čknecht | Powered by: GeeksWithBlogs.net