Package ejava.projects.edmv.jpa
Class JPAPersonDAOTest
- java.lang.Object
-
- ejava.projects.edmv.jpa.JPADAOTestBase
-
- ejava.projects.edmv.jpa.JPAPersonDAOTest
-
public class JPAPersonDAOTest extends JPADAOTestBase
This test case provides an example of one might test the JPA DAO. It tests only a minor set of functionality. However, this can be used as a starting point for more detailed tests.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ejava.projects.edmv.dao.PersonDAOdaoprivate static org.slf4j.Loggerlog-
Fields inherited from class ejava.projects.edmv.jpa.JPADAOTestBase
em
-
-
Constructor Summary
Constructors Constructor Description JPAPersonDAOTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidtearDown()voidtestJPACreate()This method tests a single create into the database using the DAO.-
Methods inherited from class ejava.projects.edmv.jpa.JPADAOTestBase
cleanup, setUpClass, tearDownClass
-
-
-
-
Method Detail
-
setUp
public void setUp() throws Exception- Overrides:
setUpin classJPADAOTestBase- Throws:
Exception
-
tearDown
public void tearDown() throws Exception- Overrides:
tearDownin classJPADAOTestBase- Throws:
Exception
-
testJPACreate
public void testJPACreate() throws ExceptionThis method tests a single create into the database using the DAO. This tests some core functionality, but clearly more types of inserts should also be tested. For example, what happens when the same userId is added a second time.- Throws:
Exception
-
-