dimanche 4 septembre 2016

How to correctly do unit-tests in ASP.NET MVC multi-layer application?

I've used unit-tests in small ASP.NET MVC projects with monolithic architecture. In this case I just had 2 projects like SampleApplicationName and SampleApplicationName.Tests.

Now I am working in a team of 3 developers on a big project with really nice n-layer architecture. We have 5 projects in solution :

1.Data (POCO), 2.DataAccess (EF), 3.Common (helpers here), 4.Business, 5. UI (ASP.NET MVC5).

Here araise a question. How should I manage tests? Should it be separate test-projects for each exist project like Business.Tests, DataAccess.Tests, or I need to test only the final result? I mean that each method runs full path from UI -> BLL -> DAL, so should I test each project separately or have only one test project?

Aucun commentaire:

Enregistrer un commentaire