Java Reference
In-Depth Information
Listing 6.5. A Groovy JUnit test for a Java implementation
There are some code simplifications here, but this is still recognizably a standard JUnit test.
Initial data canbeprovidedbycoercing arangeintoanarrayofintegers. The
every
meth-
od in
Collection
lets me check all the return values in one statement. Otherwise this is
the same as before.
tTrue
and
assertNotNull
. Also, the Groovy
assert
has excellent debugging out-