March 2015
Intermediate to advanced
236 pages
5h 26m
English
You could write dozens or even hundreds of tests against any method of reasonable complexity. You want to think instead about how many tests you should write. You can look at branches and potentially impactful data variants in the code. A starting point is to look at loops, if statements, and complex conditionals. After that, consider data variants: what happens if a value is null or zero? How do the data values affect evaluation of the conditionals in the code?
Beyond a simple happy path where the Criteria instance holds a single matching Criterion object, each of the following conditions merits consideration for affecting an existing test case or introducing another test case:
The Criteria instance holds ...
Read now
Unlock full access