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.

Shocked

Posted by Mike Haller on Sunday, December 2. 2007 at 14:03 in Java
At work, i had to remove functionality from a project due to specification changes.

Although I have more than 200 unit tests and a coverage of 54%, the removal of the functionality did not trigger any failures.

I'm shocked and disillusioned.

About

My name is Mike Haller and I'm a software developer and architect at Bosch Software Innovations in Germany. I love programming, playing games and reading books. I like good food, making photos and learning and mentoring about the craftsmanship of commercial software development. Stack Overflow profile for mhaller

Quicksearch

Archives