package io.jrocket.infra.repository; import com.github.springtestdbunit.DbUnitTestExecutionListener; import io.jrocket.infra.config.TestConfig; import org.junit.runner.RunWith; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestExecutionListeners; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; /** * Base class for DB testing.<br> * DB testing could be useful to check query validity. */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {TestConfig.class}) @ActiveProfiles("test") @TestExecutionListeners({DependencyInjectionTestExecutionListener.class, DbUnitTestExecutionListener.class}) public abstract class RepositoryTest { }