Hi All,

I have a question regarding the use of onSetupBeforeTransaction. This will
be called before the transaction is created and will therefore not be rolled
back when the test is done. I know one can implement the
onTearDownAfterTransaction to remove the data added in
onSetupBeforeTransaction.

I created a POJO with a unique field, which causes the tests to fail as the
object is not properly removed between tests in one test case.

I moved the code from onSetupBeforeTransaction to onSetupInTransaction which
solved my problem as the object will be removed when the transaction is
rolled back.

Why is the setup done before the transaction and not in the transaction.
Doing it in the transaction should give more isolated test cases and should
be better.

Regards,

JC Oosthuizen
-- 
View this message in context: 
http://www.nabble.com/onSetupBeforeTransaction-vs-onSetupInTransaction-tp17733918s2369p17733918.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to