Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1247

GroovyTestCase.shouldFail{} should return the message of the enclosed Exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-5
    • 1.0-JSR-6
    • 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
      

      Attachments

        Activity

          People

            codevise Dierk König
            codevise Dierk König
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: