This project is read-only.

Unit Testing

Dec 3, 2010 at 10:38 PM

Would it make sense to make use of Visual Studio 2010's unit testing project capabilities? It'd help to prevent regression bugs and make it easier to check if changes will break something.

Dec 3, 2010 at 11:58 PM

We need it to work with Web Developer Express too, so it will be more likely SpecFlow/nUnit once we got there. Long overdue, but better later than never.


Dec 4, 2010 at 1:16 AM

IMHO, unit testing the BE code base will be difficult because of the design and architectural decisions made so far. For example, there is a lot of use of the active record pattern which makes it difficult to test and maintain. The Post class is a good example of this. Unit testing this class requires abstracting (mocking/stubbing) its dependencies which is very difficult.

Progressing the code base towards testing suitability would probably require it to be modified to use other widely accepted development principles, namely SOLID. Retrofitting tests to an existing code base is difficult, but more so if the code needs to be evolved to use different principles.