Third Law of TDD
According to the Third Law of TDD, you cannot write more production code than is sufficient to pass the currently failing test. The key principle here is writing the simplest code possible to make the test pass. This emphasizes the importance of simplicity in coding. It ensures that the codebase reβ¦
PMI-ACP - Third Law of TDD Example Questions
Test your knowledge of Third Law of TDD
Question 1
Beth has added a code block before running a failing test, contravening the Third Law of TDD. What should be her approach?
Question 2
Martin modified a piece of production code without having a failing test. As per the Third Law of TDD, what could be the potential implications of his actions?
Question 3
Michael is working on a new feature when he unintentionally writes a piece of code before creating a failing test. According to the Third Law of TDD, what should he do next?