As a support of my C# studies I started a "real-life" private project in C# (budget-planning tool). My plan is to apply the "lessons learned" in that project to get a real feeling for it as soon I am ready with the specific lesson. Also sometimes the "lessons learned" may seem to be violently pressed into my solution, its all about the academic value.
For supporting the refactoring which will occure by the constant change of the code I installed NUnit again. After completing the NUnit Quickstart on Nunit.org I studied the article Test-Driven Development in Dotnet by Peter Provost which gives a little deeper insight in NUnit.
In the second half of the article a method for testing user interfaces in a Model-View/Controller environment is introduced by also introducing Mock Objects. That example really hit me. So I quickly downloaded http://sourceforge.net/projects/dotnetmock/ and tried the example. It's great how the mock-objects simulates the view in that example, and by just passing a View-Interface to the model you can exchange the mock-view with a real winform or webform.
The example is based on an idea of the article The Humble Dialog Box and reading Martin Fowler's Mocks Aren't Stubs article will complete the introduction to mock objects and testing.
A really important topic for software-developing, imho. Also i recognized how my code quality improved by using the TDD approach (keyword "Tell Don't Ask" Principle!).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment