Package com.avoka.fc.core.test
Class CayenneTestCase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.avoka.fc.core.test.CayenneTestCase
-
- All Implemented Interfaces:
junit.framework.Test
- Direct Known Subclasses:
H2TestCase
public class CayenneTestCase extends junit.framework.TestCase
Provides a Cayenne JUnit TestCase which will initialize a new thread local DataContext for each executed test.
-
-
Constructor Summary
Constructors Constructor Description CayenneTestCase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertDateEquals(Date expected, Date actual)
Assert the dates are equal ignoring any time differences.org.apache.cayenne.access.DataContext
getDataContext()
Return the thread local DataContext.protected void
setUp()
This method is called before a test is executed, creating a DataContext and associating it to the current Thread.protected void
tearDown()
This method is called after a test is executed, removing the DataContext from the Thread.-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
-
-
-
-
Method Detail
-
getDataContext
public org.apache.cayenne.access.DataContext getDataContext()
Return the thread local DataContext.- Returns:
- the thread local DataContexts
-
setUp
protected void setUp() throws Exception
This method is called before a test is executed, creating a DataContext and associating it to the current Thread.- Overrides:
setUp
in classjunit.framework.TestCase
- Throws:
Exception
- See Also:
TestCase.setUp()
-
tearDown
protected void tearDown() throws Exception
This method is called after a test is executed, removing the DataContext from the Thread.- Overrides:
tearDown
in classjunit.framework.TestCase
- Throws:
Exception
- See Also:
TestCase.tearDown()
-
-