Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
-
None
Description
GroovyTestCase.shouldFail{} should return the message of the enclosed Exception.
This would allow easier testing that the Exception reveals a meaningful message.
def result = shouldFail(IllegalArgumentException.class){ throw new IllegalArgumentException('null not allowed') } assertEquals 'null not allowed', result