April 2017
Beginner
504 pages
14h 11m
English
If the assertion is complex, the risk of introducing bugs in the assertion is higher. The more complex the assertion, the higher the risk. We will write the unit tests to ease our lives and not to have more code to debug.
Additionally, one test should assert only one thing. This one assertion may be coded with multiple Assert class methods, one after the other. Still, the aim of these is to assert the correctness of one single feature of the unit. Remember the SRP: one test, one feature. A good test is like a good sniper: one shot, one kill.
Read now
Unlock full access