Class SessionTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.objectweb.jtests.jms.framework.JMSTestCase
org.objectweb.jtests.jms.framework.PTPTestCase
org.objectweb.jtests.jms.conform.session.SessionTest
- All Implemented Interfaces:
junit.framework.Test
Test sessions
See JMS specifications, sec. 4.4 Session
See JMS specifications, sec. 4.4 Session
- Version:
- $Id: SessionTest.java,v 1.2 2007/06/19 23:32:35 csuconic Exp $
- Author:
- Jeff Mesnil (jmesnil@gmail.com)
-
Field Summary
Fields inherited from class org.objectweb.jtests.jms.framework.PTPTestCase
ctx, receiver, receiverConnection, receiverQCF, receiverQueue, receiverSession, sender, senderConnection, senderQCF, senderQueue, senderSessionFields inherited from class org.objectweb.jtests.jms.framework.JMSTestCase
admin, PROP_FILE_NAME, startServer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic junit.framework.Testsuite()Method to use this class in a Test suitevoidTest that invoking theacknowledge()method of a received message from a closed session must throw anIllegalStateException.voidTest that closing a closed session does not throw an exception.voidTest that an attempt to call thecommit()method on a non transactedSessionthrows ajakarta.jms.IllegalStateException.voidTest that a call to therollback()method on a transactedSessionrollbacks all the messages sent in the transaction.voidTest that thegetTransacted()method of aSessionreturnstrueif the session is transacted,falseelse.voidTest that an attempt to call therecover()method on a transactedSessionthrows ajakarta.jms.IllegalStateException.voidTest that an attempt to call theroolback()method on a non transactedSessionthrows ajakarta.jms.IllegalStateException.voidTest that a call to therollback()method on a transactedSessionrollbacks all the messages sent in the transaction.voidTest that an attempt to use aSessionwhich has been closed throws ajakarta.jms.IllegalStateException.voidTest that it is valid to use message objects created or received via the [closed] session with the exception of a received messageacknowledge()method.Methods inherited from class org.objectweb.jtests.jms.framework.PTPTestCase
setUp, tearDownMethods inherited from class org.objectweb.jtests.jms.framework.JMSTestCase
fail, getProviderPropertiesMethods 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
-
Constructor Details
-
SessionTest
-
-
Method Details
-
testRecoverTransactedSession
public void testRecoverTransactedSession()Test that an attempt to call therecover()method on a transactedSessionthrows ajakarta.jms.IllegalStateException. -
testRollbackTransactedSession
public void testRollbackTransactedSession()Test that a call to therollback()method on a transactedSessionrollbacks all the messages sent in the transaction. -
testCommitTransactedSession
public void testCommitTransactedSession()Test that a call to therollback()method on a transactedSessionrollbacks all the messages sent in the transaction. -
testRollbackNonTransactedSession
public void testRollbackNonTransactedSession()Test that an attempt to call theroolback()method on a non transactedSessionthrows ajakarta.jms.IllegalStateException. -
testCommitNonTransactedSession
public void testCommitNonTransactedSession()Test that an attempt to call thecommit()method on a non transactedSessionthrows ajakarta.jms.IllegalStateException. -
testGetTransacted
public void testGetTransacted()Test that thegetTransacted()method of aSessionreturnstrueif the session is transacted,falseelse. -
testAcknowledge
public void testAcknowledge()Test that invoking theacknowledge()method of a received message from a closed session must throw anIllegalStateException. -
testUseMessage
public void testUseMessage()Test that it is valid to use message objects created or received via the [closed] session with the exception of a received messageacknowledge()method. -
testUsedClosedSession
public void testUsedClosedSession()Test that an attempt to use aSessionwhich has been closed throws ajakarta.jms.IllegalStateException. -
testCloseClosedSession
public void testCloseClosedSession()Test that closing a closed session does not throw an exception. -
suite
public static junit.framework.Test suite()Method to use this class in a Test suite
-