Issue Details (XML | Word | Printable)

Key: FEST-66
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Alex Ruiz
Reporter: Alex Ruiz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FEST

Deep equals for ObjectArrayAssert (issue 182)

Created: 05/Mar/09 04:43 PM   Updated: 28/Mar/09 03:25 AM   Resolved: 28/Mar/09 03:25 AM
Return to search
Component/s: Assert
Affects Version/s: FEST-Assert 1.1
Fix Version/s: FEST-Assert 1.1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive mylyn-context.zip (1 kB)



 Description  « Hide

Hi,

I am using version 1.0a1 of the FEST-Assert module.

It would be useful if ObjectArrayAssert would implement a "deep" version of the comparison methods, like isEqualTo(Object[]). By deep I mean that if the elements of the test array are arrays themselves, then isEqualTo should "recursively" call (the call wouldn't really be recursive) isEqualTo on all elements of the array.
Currently isEqualTo uses Arrays#equals(Object[], Object[]), which calls #equals for each element of the arguments. The equals method for arrays tests for identity, that's why the Array#equals methods exist in the first place.

Thanks,
Csabi


Original report: Issue 182 (Google Code)



Alex Ruiz made changes - 12/Mar/09 05:00 PM
Field Original Value New Value
Description Hi,

I am using version 1.0a1 of the FEST-Assert module.

It would be useful if ObjectArrayAssert would implement a "deep" version of the comparison methods, like {{isEqualTo(Object[])}}. By deep I mean that if the elements of the test array are arrays themselves, then {{isEqualTo}} should "recursively" call (the call wouldn't really be recursive) {{isEqualTo}} on all elements of the array.
Currently {{isEqualTo}} uses {{Arrays#equals(Object[], Object[])}}, which calls {{#equals}} for each element of the arguments. The equals method for arrays tests for identity, that's why the {{Array#equals}} methods exist in the first place.

Thanks,
Csabi

----

Original report: [Issue 182 (Google Code)|http://code.google.com/p/fest/issues/detail?id=182] and [FEST-56 (Project Kenai)|http://kenai.com/jira/browse/FEST-56].
Hi,

I am using version 1.0a1 of the FEST-Assert module.

It would be useful if ObjectArrayAssert would implement a "deep" version of the comparison methods, like {{isEqualTo(Object[])}}. By deep I mean that if the elements of the test array are arrays themselves, then {{isEqualTo}} should "recursively" call (the call wouldn't really be recursive) {{isEqualTo}} on all elements of the array.
Currently {{isEqualTo}} uses {{Arrays#equals(Object[], Object[])}}, which calls {{#equals}} for each element of the arguments. The equals method for arrays tests for identity, that's why the {{Array#equals}} methods exist in the first place.

Thanks,
Csabi

----

Original report: [Issue 182 (Google Code)|http://code.google.com/p/fest/issues/detail?id=182]
Alex Ruiz made changes - 28/Mar/09 03:24 AM
Assignee Alex Ruiz [ alexruiz ]
Alex Ruiz made changes - 28/Mar/09 03:24 AM
Status Open [ 1 ] In Progress [ 3 ]
Alex Ruiz made changes - 28/Mar/09 03:25 AM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Alex Ruiz made changes - 28/Mar/09 03:25 AM
Attachment mylyn-context.zip [ 41011 ]