[Ddtunit-users] Fw: isEquals or isSame?
Brought to you by:
jg_hamburg,
kgellien
|
From: j.gellien <j.g...@bi...> - 2006-08-25 21:12:48
|
----- Original Message -----=20
From: j.gellien=20
To: Warwick Baker=20
Sent: Friday, August 25, 2006 10:00 PM
Subject: Re: isEquals or isSame?
Hi Warwick,
the DDTUnit code uses the Collection.contains(Object obj) contract as =
stated by Java definition:(taken from JavaDoc jdk 1.4)
* Returns <tt>true</tt> if this collection contains the specified
* element. More formally, returns <tt>true</tt> if and only if =
this
* collection contains at least one element <tt>e</tt> such that
* <tt>(o=3D=3Dnull ? e=3D=3Dnull : o.equals(e))</tt>.
If you have an example that states otherwise please share this with me. =
I like to investigate it.
Any hints, ideas or comments on usage or other are welcome!
Best regards
J=F6rg
----- Original Message -----=20
From: Warwick Baker=20
To: jg_...@us...=20
Sent: Monday, August 21, 2006 5:34 AM
Subject: isEquals or isSame?
Hi there,
Tried using DDTUnit to test a DAO hibernate layer, particularly finder =
methods that return lists of objects.
Does the 'isContainedIn' test perform an isEquals or isSame check =
behond the scenes?
I also tried an isEquals on a finder that returns a unique object =
(which has overidden the equals method). It always fails with a message =
like ...
looking for object blah@012345, found object blah@654321
to me this looks like it is still doing an isSame.
Any ideas?
Regards,
Warwick Baker.
**********************************************************
This electronic mail message and any attachments are =
confidential. If you are not the intended recipient please do not use =
the information, advise us immediately and destroy this message. =
Opinions and information in this message are those of the sender and not =
necessarily those of CAL. Unless expressly permitted by the sender, you =
may not copy, disclose or use the contents in any way.
If this e-mail contains a marketing message and you do not want =
to receive such messages from CAL in the future please e-mail =
'in...@co...' including 'remove' in the subject line of the =
reply message.
**********************************************************
=20
|