groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7474) Difference between junit3 and junit 4 shouldFail {...} not described in docs
Date Mon, 06 Jul 2015 20:25:05 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-7474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14615586#comment-14615586
] 

ASF GitHub Bot commented on GROOVY-7474:
----------------------------------------

GitHub user and-dmitry opened a pull request:

    https://github.com/apache/incubator-groovy/pull/55

    GROOVY-7474: Difference between junit3 and junit 4 shouldFail {...} not described in docs

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/and-dmitry/incubator-groovy shouldfail4-doc

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-groovy/pull/55.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #55
    
----
commit b436eab366b6a0d6bd75500f94633c97e86d4154
Author: Dmitry Andreychuk <and.dmitry@gmail.com>
Date:   2015-07-06T19:55:01Z

    GROOVY-7474: Difference between junit3 and junit 4 shouldFail {...} not described in docs

----


> Difference between junit3 and junit 4 shouldFail {...} not described in docs
> ----------------------------------------------------------------------------
>
>                 Key: GROOVY-7474
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7474
>             Project: Groovy
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Dmitry Andreychuk
>            Priority: Trivial
>              Labels: contributers-welcome
>
> Groovy language documentation chapter on junit4 ([http://docs.groovy-lang.org/latest/html/documentation/#_junit_4])
states that "shouldFail can be used the same way it can be used in a GroovyTestCase". In fact
junit4 version returns exception while junit3 returns message.
> I've spent quite a lot of time trying to figure out why shouldFail in my code returns
an exception while documentation and tests say that it returns message. It turned out that
I was reading documentation for a wrong shouldFail. But I've never thought that methods in
GroovyTestCase and GroovyAssert may have different signature or semantic. A small notice in
documentation might help others avoid this confusion. An example for junit 4 version would
be nice too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message