Blog Archives

Part #3: JPA Hibernate Spring Maven Eclipse Tutorial – testing data access with HSQLDB

This tutorial focuses on testing data access logic with spring-test and hsqldb. This extends Part #2: JPA Hibernate Spring Maven Eclipse Tutorial – JPA configs and repository Testing the mapping…



Unit Test Hibernate – DAO Layer with JPA, Spring & HSQLDB

This post extends the previous one on “Unit Test Hibernate – DAO Layer with Spring & HSQLDB“. The changes are

1. Add “persistence-jpa.xml” to src/main/resources.

2. Modify the “entityManagerFactory()” method in the “SimpleConfig.java”.

persistence-jpa.xml



Unit Test Hibernate – DAO Layer with Spring & HSQLDB

Step 1: The pom.xml file with test jars, Spring jars, and hibernate jars



Unit Testing Data Access Logic in Java

Most interviewers like Java candidates those who are passionate and experienced about writing unit tests. Any non trivial Java application will be making calls to database tables. So, here are a few questions and answers testing your ability to write unit tests to test data access layer.

Q1. How will you go about unit testing the data access logic?…



800+ Java & Big Data Interview Q&As

200+ Java & Big Data Tutorials

Top