[ 
https://issues.apache.org/jira/browse/WICKET-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juergen Donnerstag resolved WICKET-2488.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M1
                   1.4.2
         Assignee: Juergen Donnerstag

applied

> QuickFix proposal WicketTesterHelper.assertEquals(final Collection<?> 
> expects, final Collection<?> actuals) should compare list sizes
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2488
>                 URL: https://issues.apache.org/jira/browse/WICKET-2488
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC7
>            Reporter: Martin Makundi
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.4.2, 1.5-M1
>
>   Original Estimate: 0.03h
>  Remaining Estimate: 0.03h
>
> Simple bug:
> WicketTesterHelper.assertEquals(expected, actual) method is supposed to check 
> whether, for example, error messages match. However, if you have a situation 
> with duplicate error messages, the test returns true even though logically 
> the test should fail
> Simple fix proposal:
> Let's add size check in addition to the containsAll check:
>       public static void assertEquals(final Collection<?> expects, final 
> Collection<?> actuals)
>       {
>               if (!expects.containsAll(actuals) || 
> !actuals.containsAll(expects) || (actuals.size() != expects.size()))
>               {
>                       failWithVerboseMessage(expects, actuals);
>               }
>       }

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

Reply via email to