ch.inftec.ju.ee.db.test.AbstractDbTestCdi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ju-testing-ee Show documentation
Show all versions of ju-testing-ee Show documentation
Contains helping classes for Unit Testing, supporting CDI and EE features, including DB access
package ch.inftec.ju.ee.db.test;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
import javax.persistence.EntityManager;
import ch.inftec.ju.testing.db.AbstractDbTest;
/**
* Base class for tests that require DB access and CDI.
*
* Will be run in a CDI container using Arquillian. Any CDI related classes
* must be added manually to the Arquillian Deployment.
* @author Martin
*
*/
public class AbstractDbTestCdi extends AbstractDbTest {
/**
* Producer method that gets the current EntityManager of the test case.
* @return EntityManager instance
*/
@Produces
@RequestScoped
public EntityManager getEntityManager() {
return this.em;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy