💡 Consider the following three laws before writing Unit Test :
1- You may not write production code until you have written a failing unit test.
2- You may not write more of a unit test than is sufficient to fail, and not com-piling is failing.
3- You may not write more production code than is sufficient to pass the currently failing test.
#CleanCode #UnitTest #TDD
1- You may not write production code until you have written a failing unit test.
2- You may not write more of a unit test than is sufficient to fail, and not com-piling is failing.
3- You may not write more production code than is sufficient to pass the currently failing test.
#CleanCode #UnitTest #TDD
Test code is just as important as production code❗️
It is not a second-class citizen .
It requires thought, design, and care .
It must be kept as clean as production code .
#CleanCode #UnitTest
It is not a second-class citizen .
It requires thought, design, and care .
It must be kept as clean as production code .
#CleanCode #UnitTest
What makes a clean test❓
Three things : Readability, readability, and readability.
Read-ability is perhaps even more important in unit tests than it is in production code .
What makes tests readable ❔
The same thing that makes all code readable :
clarity, simplicity & density of expression .
#CleanCode #UnitTest
Three things : Readability, readability, and readability.
Read-ability is perhaps even more important in unit tests than it is in production code .
What makes tests readable ❔
The same thing that makes all code readable :
clarity, simplicity & density of expression .
#CleanCode #UnitTest