0

We have an asp.net web api application, in which we used this architecture:

  1. Presentation Layer

  2. BLL layer

  3. Dal Layer

We discussed, me and my colleges, about TDD and how can we used it in our project :

My Approach

I see that we have to test the BLL layer by adding full unit tests list, Then we test the presentation layer

Other opinion

We have only to test the services(presentation layer). If a test failed then, we test only the methods(in bll) which have relation with this service

So the discussion is about

Proper vs optimized way

So I need to know

  1. What is the best approach between them?
  2. Can the size and the type of the project interfers in this comparison?

Thanks,

1
  • What's wrong with my question to vote to close it!! I don't understand Commented Apr 25, 2016 at 10:19

1 Answer 1

1

In your BL, your DAL should be injected as dependencies and you should be using Dependency Injection container like Unity. The reason being, your unit tests shld have no dependency to databases. When your BL tests are isolated from Databases your tests can run fast too

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.