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.TestCaseProvides 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 voidassertDateEquals(Date expected, Date actual)Assert the dates are equal ignoring any time differences.org.apache.cayenne.access.DataContextgetDataContext()Return the thread local DataContext.protected voidsetUp()This method is called before a test is executed, creating a DataContext and associating it to the current Thread.protected voidtearDown()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 ExceptionThis method is called before a test is executed, creating a DataContext and associating it to the current Thread.- Overrides:
setUpin classjunit.framework.TestCase- Throws:
Exception- See Also:
TestCase.setUp()
-
tearDown
protected void tearDown() throws ExceptionThis method is called after a test is executed, removing the DataContext from the Thread.- Overrides:
tearDownin classjunit.framework.TestCase- Throws:
Exception- See Also:
TestCase.tearDown()
-
-