I am in the process of retrofitting unit tests for a asp.net solution written in VB.Net and c#. The unit tests need to verify the current functionality and act as a check for future breaking changes.
The solution comprises of:
1 MVC web project written in vb.net (don't ask, it's a legacy thing)
10 other supporting projects each containing logically grouped functionality written in C#, each project contains repositories and DAL
All the classes are tightly coupled as there is no inversion of control (IOC) implemented anywhere, yet.
currently to test a controller there is the following stack:
- controller
-
- repository
-
-
- dal
-
-
-
-
- logging
-
-
First question, to unit test this correctly would I setup 1 test project and run all tests from it, or should I setup 1 test project for each project to test the functionality of that DLL only?
Second question, do I need to implement IOC to be able to use MOQ?
Third question, is it even possible to refactor IOC into a huge solution like this?
Forth question, what other options are available to get this done asap?
Aucun commentaire:
Enregistrer un commentaire