Posted in:

In Part 1, I showed how to create a very simple modular WPF application, and introduced MEF to allow us to easily add modules without changing any existing code.

In part 2, I introduce the MVVM pattern to show how we can make our applications more easily unit testable, by separating the view from the business logic. I also create some unit tests using the Microsoft unit testing framework and moq, and show how to perform code coverage analysis.

Incidentally, I normally use NUnit and TestDriven.NET instead of the Microsoft unit testing framework, which I find much simpler to use, and also supports code coverage analysis using NCover or the Visual Studio code coverage.

I do plan to follow this up with a third video, in which I replace the modules ListBox with some buttons to switch modules and show some of the typical problems you might run into when using MVVM.

Comments

Comment by Anonymous

any chance of a downloadable version?

Anonymous
Comment by Mark H

up can download it off vimeo - or did you mean the source-code? I'll get my mercurial repository up on bitbucket at some point

Comment by Pierre Mengal

I would like to download the source code as well. I'm sure I missed something (how you sync the view with the viewmodel events.

Comment by Mark H

I'll try to get the code uploaded when I do part 3

Comment by Rutix

Hey Mark! Great screencasts :). I was wondering if you were still going do a part 3. If you are not going to do a part 3 could you put the sourcecode online ?

Comment by Mark H

sorry, been busy over the summer, but I have planned the next one in this series so it will come eventually

Comment by Amino

Nice tutorial and to the point.
any ideas when the 3rd part will be online?

Comment by Mathias

That was great! Helped me getting started with my unit testing. Keep them coming Mark :)