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
Priority: Minor
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.