5 ms·
The idea behind unit tests is quite simple - you're considering your code as several black-box abstractions divided by abstraction layers with clean interfaces.
by c00p3r 16y ago
The idea behind unit tests is quite simple - you're considering your code as several black-box abstractions divided by abstraction layers with clean interfaces. Unit tests are used to be sure that after any code change each black box is still working as it should (gives the same output for the same input data) and so do each of your interfaces. Think of self-test of an aircraft - thats it.