Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    I'm still making up my mind on this question, but here's a talk of someone who has decided the answer is "no". Ian Cooper: TDD, where did it all go wrong To summarize this great talk, you should test outside-in and test new behaviors not new methods. Commented Mar 27, 2014 at 17:21
  • This its really a great talk, a must see, a eye-opener talk for a lot of people, i love it. But i think that the answer its not "no". Its "yes, but indirectly". Ian cooper talks about hexagonal architecture and test features/behaviors mocking/stubbing the ports. In this case this ports are the DAO's and this "manager/service" its tested not with an individual unit test only for this class but with a "unit test" (unit in Ian Cooper definition that i agree completely with) that test some feature in your domain that use this manager/service. Commented Mar 28, 2014 at 2:33
  • see also: When is it appropriate to not unit test? Commented Nov 18, 2015 at 12:28
  • It will depend on your system to some extent, if you are developing a system with a moderate to hight level of safety certification you will need to cover all methods regardless of triviallity Commented Nov 18, 2015 at 15:35
  • see also Where is the line between unit testing application logic and distrusting language constructs? Commented Oct 27, 2016 at 13:34