Package com.avoka.fc.core.test.junit4
Class H2Test
java.lang.Object
com.avoka.fc.core.test.junit4.H2Test
Provides an in-memory H2 Test Case.
Supports JUnit 4.8.1 Annotations
- Since:
- 17.10.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
static org.apache.cayenne.access.DataContext
Return the thread local DataContext.protected String[]
protected String
protected String
protected String
protected void
initDatabaseSchema
(org.apache.cayenne.access.DataNode dataNode, org.apache.cayenne.map.DataMap dataMap) Create the demonstration database schema using the given Cayenne DataNode and DataMap.protected void
protected void
resetRemoteUser
(Portal portal, UserAccount userAccount) void
setUp()
This method is called before a test is executed, creating a DataContext and associating it to the current Thread.protected void
Set up the test case data source.void
Tear down after each test.
-
Constructor Details
-
H2Test
public H2Test()
-
-
Method Details
-
setUp
This method is called before a test is executed, creating a DataContext and associating it to the current Thread.- Throws:
Exception
- if an error occurs- See Also:
-
tearDownAfterEachTest
Tear down after each test.- Throws:
Exception
- if an error occurs
-
getDataContext
public static org.apache.cayenne.access.DataContext getDataContext()Return the thread local DataContext.- Returns:
- the thread local DataContexts
-
setupDataSource
Set up the test case data source.- Throws:
Exception
- if an error occurs
-
initDatabaseSchema
protected void initDatabaseSchema(org.apache.cayenne.access.DataNode dataNode, org.apache.cayenne.map.DataMap dataMap) throws Exception Create the demonstration database schema using the given Cayenne DataNode and DataMap.- Parameters:
dataNode
- the Cayenne DataNodedataMap
- the Cayenne DataMap- Throws:
Exception
-
getCayenneDomainLocation
-
getDataSourceUrl
-
getDataSourceUser
-
getDataSourcePassword
-
getDataSourceJndiNames
-
loadTestData
- Throws:
Exception
-
resetRemoteUser
-