Posts Tagged ‘ testing ’

Unit Testing Spring-Hibernate Code with HSQLDB

Aug 6th, 2013 | By | Category: code snippets, design, j2ee, java

Recently, we used hibernate extensively in a Spring based ┬áJava application to connect to an Oracle DB. For unit testing, we decided that we should connect to HSQLDB so we can test out the usage of hibernate in a more portable manner. I scoured the web for snippets of code to achieve this. Finally, I […]

Auto wiring Spring Test Cases

Feb 8th, 2008 | By | Category: java

Spring is of late being used universally. Hence the need arises to either Test Spring wiring. Write test cases that are best wired using Spring due to the complexity of the wiring of the objects involved. For instance,let us consider a test case that tests a service which in turn utilizes a Dao that in […]


Feb 8th, 2008 | By | Category: process

Mocking – Introduction Objects are first rate citizens in the Java society. Like a typical society the Java world has different flavors of objects each performing its own function. The Single Responsibility principle (SRP) states that objects should perform one single responsibility to ensure maximum re-use. This principle, however sociologically sound poses huge testing challenges. […]