also, what day is today and why do I have an ugly unicorn as my avatar ;-)
-
wow! two votes to close within a minute of posting question... lighten up, smile and then get back to code ;-)Ricardo Sanchez– Ricardo Sanchez2010-04-01 21:57:05 +00:00Commented Apr 1, 2010 at 21:57
-
LOL..people around here are really trigger happyLuke101– Luke1012010-04-02 03:00:01 +00:00Commented Apr 2, 2010 at 3:00
2 Answers
First, you have to use sealed classes and singletons everywhere -- none of these wrapper classes with virtual methods that can be mocked out or anything. Next, and this is important, you have to use Reponse.Write instead of returning views. It also helps to serialize the contents of all of the form parameters, encrypt them, and store them in a hidden input on the page -- then always check the new parameters against the old ones to see which things changed. Using this way you can generate these things called "events" -- they're just like button clicks and selects on Windows Forms. These are much easier to understand and simulate in your unit tests.
3 Comments
You have a unicorn because today is April Fools Day and Jeff is a sucker for that kind of thing.
Some would say an MVC site is more testable than a ASP.NET Forms one. You make it testable by adding tests I guess.