[jira] Created: (ABDERA-102) Unit tests equality assertions, params in wrong order.

View: New views
3 Messages — Rating Filter:   Alert me  

[jira] Created: (ABDERA-102) Unit tests equality assertions, params in wrong order.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Unit tests equality assertions, params in wrong order.
------------------------------------------------------

                 Key: ABDERA-102
                 URL: https://issues.apache.org/jira/browse/ABDERA-102
             Project: Abdera
          Issue Type: Improvement
    Affects Versions: 0.3.0
            Reporter: Remy Gendron
            Priority: Trivial


When using assertEquals(), the parameters should be EXPECTED then ACTUAL.

They are currently mostly in the opposite order.

No big deal. It just makes the assertion messages more readable/clear if the parameters are provided in the proper order.

Thanks,

R.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-102) Unit tests equality assertions, params in wrong order.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/ABDERA-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566243#action_12566243 ]

James M Snell commented on ABDERA-102:
--------------------------------------

Yeah, this is my fault. It's a bad habit.  I'm not going to update them all at once, but I will update each instance as I come across them. Patches, of course, are welcome ;-)

> Unit tests equality assertions, params in wrong order.
> ------------------------------------------------------
>
>                 Key: ABDERA-102
>                 URL: https://issues.apache.org/jira/browse/ABDERA-102
>             Project: Abdera
>          Issue Type: Improvement
>    Affects Versions: 0.3.0
>            Reporter: Remy Gendron
>            Priority: Trivial
>
> When using assertEquals(), the parameters should be EXPECTED then ACTUAL.
> They are currently mostly in the opposite order.
> No big deal. It just makes the assertion messages more readable/clear if the parameters are provided in the proper order.
> Thanks,
> R.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-102) Unit tests equality assertions, params in wrong order.

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/ABDERA-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711063#action_12711063 ]

Neale Upstone commented on ABDERA-102:
--------------------------------------

Not in a position to submit a patch, but the following seems to do the trick in eclipse:

Find:  assertEquals\((.+), (.+)\);
Replace:  assertEquals\($2, $1);

(with regexp switched on naturally)

> Unit tests equality assertions, params in wrong order.
> ------------------------------------------------------
>
>                 Key: ABDERA-102
>                 URL: https://issues.apache.org/jira/browse/ABDERA-102
>             Project: Abdera
>          Issue Type: Improvement
>    Affects Versions: 0.3.0
>            Reporter: Remy Gendron
>            Priority: Trivial
>
> When using assertEquals(), the parameters should be EXPECTED then ACTUAL.
> They are currently mostly in the opposite order.
> No big deal. It just makes the assertion messages more readable/clear if the parameters are provided in the proper order.
> Thanks,
> R.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.