April 2017
Beginner
504 pages
14h 11m
English
Is this a good unit test? If you read it in a tutorial book like this, it has to be. Actually, it is not. It is a good code to demonstrate some of the tools that JUnit provides and some Java language features, but as a real JUnit test, I will not use it in a real life project.
What makes a unit test good? To answer this question, we will have to find what the unit test is good for and what it is that we use it for.
Unit tests are not to find bugs. Developers eventually use unit tests during debugging sessions but, many times, the testing code created for the debugging is a temporary one. When the bug is fixed, the code used to find it will not ...
Read now
Unlock full access