How to mock iBatis SqlMapClient
Posted by Mike Haller
on Monday, December 3. 2007
at 11:08
in Java
When mocking DAOs accessing stored procedures, declaring the expected results becomes a little bit ugly. That's because the expected results needs to be injected by reference into the IN/OUT parameter object, usually a Map. To make things worse, this Map could be created within the class under test, so you need additional effort to mock that, too.My solution is based on EasyMock, Spring Framework and Apache iBatis SqlMap for Java.
