Defining a test case superclass

The first step is to create a superclass that all of our DAO test cases will inherit. This abstract class looks like the following code snippet:

package com.gieman.tttracker.dao; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests; @ContextConfiguration("/testingContext.xml") public abstract class AbstractDaoForTesting extends AbstractTransactionalJUnit4SpringContextTests { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired(required = true) protected CompanyDao ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.