I have been watching this video today https://build.microsoft.com/en-US/sessions/BRK207?source=sessions and I caught myself thinking of a story from old times.
Once I was fixing a very simple bug… And it was so simple and the scenario was so simple so I fixed it and then wrote the unit test.
Big mistake.
Needless to say, the bug resurfaced later in a different condition or scenario and the test did not catch it .
The reason was that I did not test the test… I did not make sure it catches the issue.
This is why you go the unit test first. Make sure it fails, make sure it fails right and does what is needed.
Then you fix the bug.
Leave a comment