You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Gary Shea <sh...@gtsdesign.com> on 2004/05/17 20:19:38 UTC

unit testing and Criteria

Hi --

I've started a page on the wiki on unit testing with Torque, hopefully
folks can learn from my mistakes.

Currently I'm wondering about the Criteria.equals() method.  Ideally,
this would be the ultimate unit-testing tool.  Create a known-correct
Criteria, use equals() to compare it to the result from the code under
test.  It doesn't seem to work that way at the moment, but it doesn't
have to, the semantics of equals() are loose enough so that the author
can write it however he or she wants to.

Should two Criteria objects which are identical except for the order in
which constraints are added and whether they are entered as primitives
or objects be considered equal?

If so, I'll try and track down the problem and submit a patch.

        Gary


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: unit testing and Criteria

Posted by Scott Eade <se...@backstagetech.com.au>.
Gary Shea wrote:

>I've started a page on the wiki on unit testing with Torque, hopefully
>folks can learn from my mistakes.
>
Excellent!

>
>Currently I'm wondering about the Criteria.equals() method.  Ideally,
>this would be the ultimate unit-testing tool.  Create a known-correct
>Criteria, use equals() to compare it to the result from the code under
>test.  It doesn't seem to work that way at the moment, but it doesn't
>have to, the semantics of equals() are loose enough so that the author
>can write it however he or she wants to.
>
>Should two Criteria objects which are identical except for the order in
>which constraints are added and whether they are entered as primitives
>or objects be considered equal?
>
Yes.

>
>If so, I'll try and track down the problem and submit a patch.
>
This would be most welcome.

Scott
--

Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org