First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

DI

There are 1 entries for the tag DI

How to mock a NHibernate Repository

 In my current project I'm trying to apply the best practices for building "great software" (cit.). One of the best practices is using a (kind of) TDD approach, using Inversion of Control and Dependency Injection to test only the relevant parts of your code without testing all the layers of your applications, DB included, during each test. Which are the benefits of this approach? First of all your tests run quicker because they are not hitting the database all the times. Second, you don't need to restore the initial state for the database. Third, if you are...