-
May 10th, 2011, 10:33 PM
#21
Manco,
I'm guessing your com.my.TransactionManager class implements some TransactionManagerInterface somewhere in its hierarchy? I'd try to mock that interface instead of the TransactionManager class itself (use com.my.TransactionManagerInterface as the constructor-arg value of the mockTransactionManager bean)...
A more interesting question is: why do you need to mock the TransactionManager? Is it used directly in the code base?
In my experience, you need the real TransactionManager instance in the Integration tests, but you don't need any TransactionManager in Unit tests...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules