Not sure there is a perfect answer.
If you have cascading deletes in place, there might be nothing to do.
I assume that isn't the case or you probably wouldn't expect to
have to delete both. Depending on your SQL skills or access to
SQL gurus, you might be able to write something by hand that
will do the deletes only if needed. If so, then you can use
that more complicated query with sqlunit.
Otherwise, I would probably do some conditional processing
in Ant or Groovy and call sqlunit twice.
Actually, the more I think about it, I would probably write
a Groovy script to do the whole thing but it depends on what
you are most familiar with.
If you have a few more details on your example perhaps
we can help further.
Cheers, Paul.
A Vander wrote:
Hope there are some sqlunit guru's out here... :-).
In order to setup my database, I need to cleanup to tables, say 'person' and
'adress'. If the test person is still in the db I have to remove all his
adress records.
I've been looking at the sqlunit manual but it's unclear to me how I can run
the 'remove adresses' step only if I found the person's adress first?
TIA, Avander;
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest