Aug 6, 2022
Bugs are easily caught by behavioral tests.
Unit tests can detect if a design assumption has changed, but there is another approach: be very intentional about the design - i.e., actually design the code before you write it.
Here is what I do: https://pddev.blogspot.com/