Package ejava.projects.esales.jpa
Class JPAAccountDAOTest
- java.lang.Object
-
- ejava.projects.esales.jpa.JPADAOTestBase
-
- ejava.projects.esales.jpa.JPAAccountDAOTest
-
public class JPAAccountDAOTest 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 private ejava.projects.esales.dao.AccountDAO
dao
private static org.slf4j.Logger
log
-
Fields inherited from class ejava.projects.esales.jpa.JPADAOTestBase
em
-
-
Constructor Summary
Constructors Constructor Description JPAAccountDAOTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
void
testJPACreate()
This method tests a single create into the database using the DAO.-
Methods inherited from class ejava.projects.esales.jpa.JPADAOTestBase
setUpClass, tearDown, tearDownClass
-
-
-
-
Method Detail
-
setUp
public void setUp() throws Exception
- Overrides:
setUp
in classJPADAOTestBase
- Throws:
Exception
-
testJPACreate
public void testJPACreate() throws Exception
This 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
-
-