Groovy

Powerful asserts in Groovy 1.7-beta

This will make every TDD/Groovy enthusiast happy: Groovy 1.7 will contain powerful assertions. This assertion here

assert new File('foo.bar') == new File('example.txt')

will yield this output:

Caught: Assertion failed:
 
assert new File('foo.bar') == new File('example.txt')
       |                   |  |
       foo.bar             |  example.txt
                           false

Isn’t that cool?
Read more about the new Features in Groovy 1.7.

“Soft assertions” in Groovy

Ted Naleid hat einen guten Artikel über Unit-Testing mit Soft Assertions geschrieben.