db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michel Beijlevelt / Lucka <...@lucka.nl>
Subject Re: unit testing code using torque
Date Mon, 18 Aug 2003 14:28:38 GMT
I must admit I'm not sure what you're trying to say.

Are you saying that our JUnit tests shouldn't include testing Torque 
functionality ?

Well, they don't. We're not testing Torque-logic itself.

But the (business) logic we're testing is dependent on certain database 
circumstances that we create using Torque during the tests, and is using 
Torque as part of the business logic. In this scenario I'd don't like to 
use mock objects instead of  real Torque objects because when the 
application will be running in real life, it will be using the Torque 
objects as well, and thus I want to be sure that my application together 
with Torque is running as expected. Anyway, that's what I was trying to 
say in my previous mail.

For example, if want to test if creating a Contract fails when there 
already is another Contract active, I first create an active Contract 
(using Torque logic underneath) , then create another Contract (using 
Torque logic underneath)  and assert the second creation failed.

gr. Michel



Jeffrey D. Brekke wrote:

>Sounds like your testing factory should be in the torque project, testing itself.  
>
>If you are comfortable that torque doesn't have any errors, then maybe
>we wouldn't feel like we have to test access through torque to the db
>in all our application tests.  Unless you are also really testing
>things other than your code.
>



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


Mime
View raw message