com.thoughtworks.xjb.cmt
Class XjbTransactionHandlerTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.jmock.core.VerifyingTestCase
org.jmock.core.MockObjectSupportTestCase
org.jmock.MockObjectTestCase
com.thoughtworks.xjb.cmt.TransactionMockingTestCase
com.thoughtworks.xjb.cmt.XjbTransactionHandlerTest
- All Implemented Interfaces:
- junit.framework.Test
- public class XjbTransactionHandlerTest
- extends TransactionMockingTestCase
- Author:
- Dan North
| Fields inherited from class org.jmock.core.MockObjectSupportTestCase |
ANYTHING, NOT_NULL, NULL |
| Methods inherited from class org.jmock.MockObjectTestCase |
atLeastOnce, defaultMockNameForType, mock, mock, never, newCoreMock, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, throwException |
| Methods inherited from class org.jmock.core.MockObjectSupportTestCase |
and, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, isA, newDummy, newDummy, newDummy, not, or, same, stringContains |
| Methods inherited from class org.jmock.core.VerifyingTestCase |
registerToVerify, runBare, unregisterToVerify, verify |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runTest, setName, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
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, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
XjbTransactionHandlerTest
public XjbTransactionHandlerTest()
testShouldStartWithNoTransaction
public void testShouldStartWithNoTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldFindExistingTransaction
public void testShouldFindExistingTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldCreateTransactionIfNoneExistsWhenRequiredMethodIsInvoked
public void testShouldCreateTransactionIfNoneExistsWhenRequiredMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldCommitTransactionWhenRequiredMethodSucceeds
public void testShouldCommitTransactionWhenRequiredMethodSucceeds()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldReuseExistingTransactionIfOneExistsWhenRequiredMethodIsInvoked
public void testShouldReuseExistingTransactionIfOneExistsWhenRequiredMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCommitTransactionWhenRequiredMethodSucceedsIfThisHandlerDidNotCreateIt
public void testShouldNotCommitTransactionWhenRequiredMethodSucceedsIfThisHandlerDidNotCreateIt()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldRollbackTransactionWhenRequiredMethodFails
public void testShouldRollbackTransactionWhenRequiredMethodFails()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotRollbackTransactionWhenRequiredMethodFailsIfThisHandlerDidNotCreateIt
public void testShouldNotRollbackTransactionWhenRequiredMethodFailsIfThisHandlerDidNotCreateIt()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldCreateTransactionWhenRequiresNewMethodIsInvoked
public void testShouldCreateTransactionWhenRequiresNewMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldCommitTransactionWhenRequiresNewMethodSucceeds
public void testShouldCommitTransactionWhenRequiresNewMethodSucceeds()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldRollbackTransactionWhenRequiresNewMethodFails
public void testShouldRollbackTransactionWhenRequiresNewMethodFails()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldSuspendExistingTransactionWhenRequiresNewMethodIsInvokedAndRestoreAfterItEnds
public void testShouldSuspendExistingTransactionWhenRequiresNewMethodIsInvokedAndRestoreAfterItEnds()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldSuspendExistingTransactionWhenRequiresNewMethodIsInvokedAndRestoreAfterItFails
public void testShouldSuspendExistingTransactionWhenRequiresNewMethodIsInvokedAndRestoreAfterItFails()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCreateTransactionIfNoneExistsWhenSupportsMethodIsInvoked
public void testShouldNotCreateTransactionIfNoneExistsWhenSupportsMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCreateTransactionIfOneAlreadyExistsWhenSupportsMethodIsInvoked
public void testShouldNotCreateTransactionIfOneAlreadyExistsWhenSupportsMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCreateTransactionIfNoneExistsWhenNotSupportedMethodIsInvoked
public void testShouldNotCreateTransactionIfNoneExistsWhenNotSupportedMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldSuspendTransactionIfOneExistsWhenNotSupportedMethodIsInvoked
public void testShouldSuspendTransactionIfOneExistsWhenNotSupportedMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldRestoreTransactionIfOneExistedWhenNotSupportedMethodSucceeds
public void testShouldRestoreTransactionIfOneExistedWhenNotSupportedMethodSucceeds()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldRestoreTransactionIfOneExistedWhenNotSupportedMethodFails
public void testShouldRestoreTransactionIfOneExistedWhenNotSupportedMethodFails()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldThrowEJBExceptionIfNoTransactionExistsWhenMandatoryMethodIsInvoked
public void testShouldThrowEJBExceptionIfNoTransactionExistsWhenMandatoryMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCreateTransactionIfOneExistsWhenMandatoryMethodIsInvoked
public void testShouldNotCreateTransactionIfOneExistsWhenMandatoryMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCommitWhenMandatoryMethodSucceeds
public void testShouldNotCommitWhenMandatoryMethodSucceeds()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotRollbackWhenMandatoryMethodFails
public void testShouldNotRollbackWhenMandatoryMethodFails()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldThrowEJBExceptionIfTransactionExistsWhenNeverMethodIsInvoked
public void testShouldThrowEJBExceptionIfTransactionExistsWhenNeverMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCreateTransactionIfNoneExistsWhenNeverMethodIsInvoked
public void testShouldNotCreateTransactionIfNoneExistsWhenNeverMethodIsInvoked()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotCommitTransactionWhenNeverMethodSucceeds
public void testShouldNotCommitTransactionWhenNeverMethodSucceeds()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldNotRollbackTransactionWhenNeverMethodFails
public void testShouldNotRollbackTransactionWhenNeverMethodFails()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldRestoreSuspendedTransactionIfCommitThrowsExceptionWhenMethodSucceeds
public void testShouldRestoreSuspendedTransactionIfCommitThrowsExceptionWhenMethodSucceeds()
throws java.lang.Exception
- Throws:
java.lang.Exception
testShouldRestoreSuspendedTransactionIfRollbackThrowsExceptionWhenMethodFails
public void testShouldRestoreSuspendedTransactionIfRollbackThrowsExceptionWhenMethodFails()
throws java.lang.Exception
- Throws:
java.lang.Exception