on 9/29/2010 11:07 AM
I have had troubles writing unit tests for classes with a lot of dependencies. The reason for this is that the initialization of the state for my test code would look like: [Setup] public void Setup() {    stub1 = new Mock(); …   stub20 = new Mock();   mock = new Mock(); …// Setup mock and stub behavior   classToTest = new TypeOfClass( /a lot of code/); } This isn’t very maintainable. How do we make this easier to maintain? I’ve introduced a helper class that initializes most of the interfaces to stubs of [...]
>> Read the full article on assertfail.gewalli.se
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper