BRACE YOURSELVES! We're Testing Implementation Details
May 29, 2024
• 280 views
microsoft mvpmicrosoftunit testingsoftware testing pyramidxunittest driven developmentcode coverage100% code coverageintegration testingblack box testingautomated testtdd tutorialxunit unit testsoftware testingautomated unit testingunit testtddnick chapsasbddimplementation detailstdd programmingmoq c#moq for beginnerswhat is moqmocking with moqxunit theoryxunit .netdotnetxunit tutorialnet corexunit factxunit moq
They said don't do it. They said it's the wrong way to write tests. They said never do it this way. But you know me: I don't believe in "always" and "never".
The general advice is that testing implementation details is "bad" because if you change the implementation, your tests are brittle to such changes. Instead, you should only test against the API. This seems like great advice on the surface, because after all, who wants to go remake tests when you refactor or rewrite code?
Join me as I walk you through why you may want to consider breaking the "rules" of testing because... testing is just about building confidence in the code we're delivering.
