org.exolab.jmscts.test.asf.ConnectionConsumerTest

This class tests the behaviour of ConnectionConsumer s

test

Verifies that a ConnectionConsumer can be created

Requirements
asf.connectionconsumer For application servers, connections provide a special facility for creating a ConnectionConsumer. The messages it is to consume are specified by a destination and a message selector. In addition, a ConnectionConsumer must be given a ServerSessionPool to use for processing its messages. A maxMessages value is specified to limit the number of messages a ConnectionConsumer may load at one time into a ServerSession's session.

org.exolab.jmscts.test.connection.AuthTest

This class tests connection authorisation

testInvalidQueueAuth

Verifies that a QueueConnection cannot be created, when using an invalid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

testInvalidTopicAuth

Verifies that a TopicConnection cannot be created, when using an invalid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

testQueueAuth

Verifies that a QueueConnection can be created, using a valid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

testTopicAuth

Verifies that a TopicConnection can be created, using a valid username and password

Requirements
connection.authentication When creating a connection, a client may specify its credentials as a name/password. JMSSecurityException must be thrown when a provider rejects a user name/password submitted by a client

org.exolab.jmscts.test.connection.ClientIdentifierTest

This class verifies that the client identifier can be set, but only on creation of a connection.

testDuplicateClientID

Verifies that two connections may not have the same client identifier

Requirements
connection.clientID.duplicate The client state identified by a client identifier can be in use by only one client at a time. A JMS provider must prevent concurrently executing clients from using it. This prevention may take the form of JMSExceptions thrown when such use is attempted; it may result in the offending client being blocked; or some other solution. A JMS provider must insure that such attempted 'sharing' of an individual client state does not result in messages being lost or doubly processed. TODO - don't handle the blocked scenario

testSetAfterClose

Verifies that the client identifier cannot be set on a closed connection

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterCreateSession

Verifies that the client identifier cannot be set after a session has been created

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterListenerRegistration

Verifies that the client identifier cannot be set after an exception listener has been registered

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterStart

Verifies that the client identifier cannot be set after the connection has been started

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetAfterStop

Verifies that the client identifier cannot be set after the connection has stopped

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

testSetOnCreation

Verifies that the client identifier can be set on a connection, just after it is created, but not subsequently.

Requirements
connection.method.setClientID If a client explicitly sets the client identifer it must do this immediately after creating the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.
connection.clientID.administered The facility to explicitly set a connection's client identifier is not a mechanism for overriding the identifier that has been administratively configured. It is provided for the case where no administratively specified identifier exists. If one does exist, an attempt to change it by setting it must throw an IllegalStateException.

org.exolab.jmscts.test.connection.ConnectionCloseTest

This class tests the behaviour of Connection.close

testCloseForClosedConnection

Verifies that closing a closed connection does not produce an exception.

Requirements
connection.close.closed Closing a closed connection must NOT throw an exception.

testExceptionOnClose

Verifies that a IllegalStateException is thrown for any Connection method (except Connection.close()), if the connection has been closed

Requirements
connection.close Once a connection has been closed, an attempt to use it or its sessions or their message consumers and producers must throw an IllegalStateException (calls to the close method of these objects must be ignored).

org.exolab.jmscts.test.connection.ListenerTest

This class tests the behaviour of stopping and closing a connection while a listener is active. NOTE: Temporary destinations cannot be used as a separate connection is required to verify that the test is successful.

testConnectionClose

Verifies that running MessageListeners have full access to connection if the connection is closed - the close invocation must wait until they complete.

Requirements
connection.close.listeners If one or more of the connection's session's message listeners is processing a message at the point when connection close is invoked, all the facilities of the connection and its sessions must remain available to those listeners until they return control to the JMS provider.

testConnectionStop

Verifies th at running MessageListeners have full access to the connection, if the connection is stopped.

Requirements
connection.stop.listeners A stop method call must not return until delivery of messages has paused. This means a client can rely on the fact that none of its message listeners will be called and all threads of control waiting for receive to return will not return with a message until the connection is restarted. If MessageListeners are running when stop is invoked, stop must wait until all of them have returned before it may return. While these MessageListeners are completing, they must have the full services of the connection available to them. TODO - test behaviour of sending messages while a listener is active, using a different session (i.e, not from the listener - undefined?) TODO - add test where a thread stops a connection and another starts it as the stop is in progress.

org.exolab.jmscts.test.connection.MetaDataTest

This class tests that connections support JMSXGroupID and JMSXGroupSeq properties.

testMetaData

Verifies that the connection supports JMSXGroupID and JMSXGroupSeq properties.

Requirements
connection.metadata.properties ConnectionMetaData provides a list of the JMS defined property names supported by the connection. This must include JMSXGroupID and JMSXGroupSeq

org.exolab.jmscts.test.connection.ReceiverTest

This class tests the behaviour of stopping and closing a connection while a receiver is active.

testConnectionClose

Verifies that the receive timers for a closed connection continue to advan ce, so receives may time out and return a null message as the connection is closed.

Requirements
connection.close.receivers A close terminates all pending message receives on the connection's session's consumers. The receives may return with a message or null depending on whether or not there was a message available at the time of the close.

testConnectionRestart

Verifies that the receive timers for a stopped connection continue to advance, so that when the connection is stopped, a waiting receiver can subsequently receive a message when the connection is started again

Requirements
connection.stop.receivers The receive timers for a stopped connection continue to advance, so receives may time out and return a null message while the connection is stopped.

testConnectionStop

Verifies that the receive timers for a stopped connection continue to advance, so receives may time out and return a null message while the connection is stopped.

Requirements
connection.stop.receivers The receive timers for a stopped connection continue to advance, so receives may time out and return a null message while the connection is stopped.

org.exolab.jmscts.test.connection.SendReceiveStopTest

This class tests the behaviour of Connection.stop and Connection.start

testStop

Verifies that a connection doesn't receive any messages after starting a connection, sending messages, and then stopping it.

Requirements
connection.stopped No mes sages are delivered by a connection to its client until it has been started.

testStoppedOnCreation

Verifies that a connection does not receive any messages on creation.

Requirements
connection.creation When a Connection is created, it is in stopped mode. That means that no messages are being delivered to it.
connection.stopped No messages are delivered by a connection to its client until it has been started.
connection.stopped.send Stopping a connection has no effect on its ability to send messages.

org.exolab.jmscts.test.connection.StopStartTest

This class tests the behaviour of Connection.stop and Connection.start

testStartForStartedConnection

Verifies that invoking Connection.start() for a started connection has no effect.

Requirements
connection.start.started Starting a started connection is ignored.

testStopForStoppedConnection

Verifies that invoking Connection.stop() for a stopped connection has no effect.

Requirements
connection.stop.stopped Stopping a stopped connection is ignored.

org.exolab.jmscts.test.message.bytes.BytesMessageTest

This class tests the BytesMessage message type.

testInvalidObject

Verifies that attempting to write an invalid object using the BytesMessage.writeObject() method throws MessageFormatException

Requirements
message.bytes.method.writeObject Refer to javadoc

testPartialReadBytes1

Verifies that the BytesMessage.readBytes(byte[ ] , int) method can be called multiple times passing a byte array less than the length of the byte stream, and that the result matches that expected.

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testPartialReadBytes2

Verifies that the BytesMessage.readBytes(byte[ ] , int) method can be called multiple times passing a length parameter less than the length of the array, and that the result matches that expected.

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testReadBytes

Verifies the behaviour of the BytesMessage.readBytes(byte[ ] ) method.

Requirements
message.bytes.method.readBytes(1) Refer to javadoc

testReadBytesForEmptyStream1

Verifies that the BytesMessage.readBytes(byte[ ] ) method returns -1 to indicate end-of-stream, for an empty message body.

Requirements
message.bytes.method.readBytes(1) Refer to javadoc

testReadBytesForEmptyStream2

Verifies that the BytesMessage.readBytes(byte[ ] , int) method returns -1 to indicate end-of-stream, for an empty message body.

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testReadBytesIndexException

Verifies that the BytesMessage.readBytes(byte[ ] , int) method throws IndexOutOfBoundsException for invalid length parameters

Requirements
message.bytes.method.readBytes(2) Refer to javadoc

testReadFailure

Verifies that if a read method throws MessageFormatException or NumberFormatException, the current position of the read pointer is not be incremented, and that a subsequent read is capable of recovering from the exception by re-reading the data as a different type.

NOTE: With the exception of the readUTF() method, it is difficult to conceive test cases for read methods.

  • A provider that implements BytesMessage using a DataInputStream or equivalent, is likely to only throw MessageFormatException for the readUTF() method.

    The other likely exceptions are MessageEOFException for stream overruns, and JMSException for any other error.
  • As BytesMessage does not support conversion, NumberFormatException is unlikely to be thrown.

Requirements
message.bytes.read If a read method of a BytesMessage throws a MessageFormatException or NumberFormatException, the current position of the read pointer must not be incremented. A subsequent read must be capable of recovering from the exception by re-reading the data as a different type.

NOTE: With the exception of the readUTF() method, it is difficult to conceive test cases for read methods.
  • A provider that implements BytesMessage using a DataInputStream or equivalent, is likely to only throw MessageFormatException for the readUTF() method.

    The other likely exceptions are MessageEOFException for stream overruns, and JMSException for any other error.
  • As BytesMessage does not support conversion, NumberFormatException is unlikely to be thrown.

testWriteObject

Verfies that all objectified primitives can be written using the BytesMessage.writeObject() method

Requirements
message.bytes.method.writeObject Refer to javadoc

org.exolab.jmscts.test.message.clear.ClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties()

testBytesClearBody

Verifies that BytesMessage.clearBody() leaves the message body empty, and doesn't clear the message properties.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.bytes.method.clearBody When clearBody is called on a BytesMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testBytesClearBodyOnCreation

Verifies that BytesMessage.clearBody() can be invoked for a new message

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's cre ate method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.bytes.method.clearBody When clearBody is called on a BytesMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testClearBody

Verifies that Message.clearBody() leaves the message body empty, and doesn't clear the message properties.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearBodyOnCreation

Verifies that Message.clearBody() can be invoked for a new message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearProperties

Verifies that Message.clearProperties() leaves the message properties empty, and doesn't clear the message body.

Requirements
message.method. clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.

testClearPropertiesOnCreation

Verifies that Message.clearProperties() can be invoked for a new message.

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.

testStreamClearBody

Verifies that StreamMessage.clearBody() leaves the message body empty, and doesn't clear the message properties.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.stream.method.clearBody When clearBody is called on a StreamMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testStreamClearBodyOnCreation

Verifies that StreamMessage.clearBody() can be invoked for a new message

Requirements
message.method.clear Body The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.stream.method.clearBody When clearBody is called on a StreamMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

org.exolab.jmscts.test.message.clear.RecoverClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties() for CLIENT_ACKNOWLEDGE sessions where the session is recovered.

testRecover

Verifies that clearing the properties and bodies of received messages doesn't affect the messages received after recovering the session

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

org.exolab.jmscts.test.message.clear.RollbackClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties() for transacted sessions where the session is rolled back.

testRollback

Verifies that clearing the properties and bodies of received messages doesn't affect the messages received after rolling back the session

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

org.exolab.jmscts.test.message.clear.SendReceiveClearTest

This class tests the behaviour of Message.clearBody() and Message.clearProperties() on send and receipt, against all message, delivery, and transaction types

testBytesClearBodyOnReceipt

Verifies that BytesMessage.clearBody() leaves the message body empty, and doesn't clear the message properties, on receipt of a message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.bytes.method.clearBody When clearBody is called on a BytesMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

testClearBodyOnReceipt

Verifies that Message.clearBody() leaves the message body empty, and doesn't clear the message properties, on receipt of a message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearOnSend

Verifies that Message.clearProperties() and Message.clearBody() on send doesn't affect the sent message

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.

testClearPropertiesOnReceipt

Verifies that Message.clearProperties() leaves the message properties empty, and doesn't clear the message body, on receipt of a message.

Requirements
message.method.clearProperties Clearing a message's properties leaves the message with an empty set of properties. New property entries can then be both created and read. Clearing a message's property entries does not clear the value of its body.

testStreamClearBodyOnReceipt

Verifies that StreamMessage.clearBody() leaves the message body empty, and doesn't clear the message properties, on receipt of a message.

Requirements
message.method.clearBody The clearBody method of Message resets the value of the message body to the empty initial message value as set by the message type's create method provided by Session. Clearing a message's body does not clear its property entries. When a message is cleared, its message body and properties may be set.
message.stream.method.clearBody When clearBody is called on a StreamMessage, the body of the message is in write-only mode.

If clearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.

org.exolab.jmscts.test.message.close.CloseTest

This class tests the behaviour of messages when the associated connection or session is closed.

testCloseConnection

Verifies that all the methods for a message may be invoked for a closed connection, with the exception of Message.acknowledge() , which should throw Illeg alStateException .

Requirements
connection.close.message It is valid to continue to use message objects created or received after a connection has been closed with the exception of a received message's acknowledge method. Invoking the acknowledge method of a received message must throw an IllegalStateException.

testCloseSession

Verifies that all the methods for a message may be invoked for a closed session, with the exception of Message.acknowledge() , which should throw IllegalStateException .

Requirements
session.close.message It is valid to continue to use message objects created or received via the session, with the exception of a received message'acknowledge method. Invoking the acknowledge method of a received message must throw an IllegalStateException.

org.exolab.jmscts.test.message.copy.BytesMessageTest

This class tests that BytesMessage copies content

testPartialWriteBytesCopy

Verifies that BytesMessage.writeBytes(byte[ ] , int, int) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testWriteBytesCopy

Verifies that BytesMessage.writeBytes(byte[ ] ) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.copy.MapMessageTest

This class tests that MapMessage copies byte array content

testByteArrayCopy

Verifies that MapMessage.setObject() copies byte arrays

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testPartialSetBytesCopy

Verifies that MapMessage.setBytes(byte[ ] , int, int) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testSetBytesCopy

Verifies that MapMessage.setBytes(byte[ ] ) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.copy.MessageCopyTest

This class tests that message properties and message bodies are copied on send and receive.

testCopyOnSend

Verifies that messages are copied by the provider on send.

Requirements
message.send After sending a message, a client may retain and modify it without affecting the message that has been sent. The same message object may be sent multiple times.

org.exolab.jmscts.test.message.copy.ObjectMessageTest

This class tests that ObjectMessage copies content

testByteArrayCopy

Verifies that ObjectMessage.setObject() copies byte arrays

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testCopyAtConstruction

Verifies that ObjectMessage.getObject() returns a different reference to that set, when the object is supplied at construction

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testCustomObjectCopy

Verifies that ObjectMessage.setObject() copies user objects

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.copy.StreamMessageTest

This class verifies that StreamMessage copie s content

testByteArrayCopy

Verifies that StreamMessage.setObject() copies byte arrays

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testPartialWriteBytesCopy

Verifies that StreamMessage.writeBytes(byte[ ] , int, int) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

testWriteBytesCopy

Verifies that StreamMessage.writeBytes(byte[ ] ) takes a copy of the byte array.

Requirements
message.copy The JMS message interfaces provide read/get methods for accessing objects in a message body. All of these methods must be implemented to return a copy of the accessed objects.

org.exolab.jmscts.test.message.foreign.ForeignMessageTest

This class tests the behaviour of sending 'foreign' messages. A 'foreign' message is one whose implementation is not one of those of the target provider.

test

Verifies that 'foreign' messages are supported by the JMS provider

Requirements
message.foreign A provider must be prepared to accept, from a client, a message whose implementation is not one of its own. A message with a 'foreign' implementation may not be handled as efficiently as a provider's own implementation; however, it must be handled.

Note that if the foreign message implementation contains a JMSReplyTo header field that is set to a foreign destination implementation, the provider is not required to handle or preserve the value of this field.

org.exolab.jmscts.test.message.header.JMSCorrelationIDTest

This class tests the JMSCorrelationID message property

testCorrelationID

Verifies that the JMSCorrelationID header property can be set, and that the received message has the same JMSCorrelationID value as that sent

Requirements
message.correlation The JMSCorrelationID header field may be used to link one message with another. It can contain a provider-specific message ID, an application-specific string, or a provider-native byte[ ] value. The application-specific string must not start with the 'ID:' prefix: this is reserved for provider generated messages Ids.

testCorrelationIDAsBytes

Verifies the behaviour of the JMSCorrelationIDAsBytes methods.

Requirements
message.correlation.bytes If a provider supports the native concept of correlation ID, a JMS client may need to assign specific JMSCorrelationID values to match those expected by non-JMS clients. A byte[ ] value is used for this purpose. JMS providers without native correlation ID values are not required to support byte[ ] values - in this case setJMSCorrelationIDAsBytes() and getJMSCorrelationIDAsBytes() may throw java.lang.UnsupportedOperationException.

testNullCorrelationID

Verifies that a null can be assigned to JMSCorrelationID when:

  • a message is intially constructed
  • a message is received with a non-null JMSCorrelationID

Requirements
message.correlation The JMSCorrelationID header field may be used to link one message with another. It can contain a provider-specific message ID, an application-specific string, or a provider-native byte[ ] value. The application-specific string must not start with the 'ID:' prefix: this is reserved for provider generated messages Ids.

org.exolab.jmscts.test.message.header.JMSDestinationTest

This class tests the JMSDestination message property

testJMSDestination

Verifies that the JMSDestination is assigned when a message is sent, and that the received message has the same JMSDestination value as that sent

Requirements
message.destination When a message is sent, JMSDestination is ignored. After completion of the send it holds the destination object specified by the sending method. When a message is received, its destination value must be equivalent to the value assigned when it was sent.

testJMSDestinationOnResend

Verifies that the JMSDestination is assigned when a message is resent to a different destination

Requirements
message.destination When a message is sent, JMSDestination is ignored. After completion of the send it holds the destination object specified by the sending method. When a message is received, its destination value must be equivalent to the value assigned when it was sent.

org.exolab.jmscts.test.message.header.JMSMessageIDTest

This class tests the JMSMessageID message property

testJMSMessageID

Verifies that the JMSMessageID is assigned when a message is sent, that the received message has the same JMSMessageID value, as that sent, and that a new JMSMessageID is assigned when the message is resent

Requirements
message.identifier When a message is sent, JMSMessageID is ignored. When the send method returns it contains a provider-assigned value.

testJMSMessageIDAssignment

Verifies that the JMSMessageID is assigned each time a message is sent

Requirements
message.identifier When a message is sent, JMSMessageID is ignored. When the send method returns it contains a provider-assigned value.

testJMSMessageIDPrefix

Verifies that JMSMessageID is prefixed with 'ID:'

Requirements
message.identifier.prefix All JMSMessageID values must start with the prefix 'ID:'

org.exolab.jmscts.test.message.header.JMSReplyToTest

This class tests the JMSReplyTo message property.

testReplyTo

Verifies that the reply-to address on a received message can be used to send and subsequently receive a message.

Requirements
message.replyTo The JMSReplyTo header field contains a Destination supplied by a client when a message is sent. It is the destination where a reply to the message should be sent.

Messages sent with a null JMSReplyTo value may be a notification of some event or they may just be some data the sender thinks is of interest.

org.exolab.jmscts.test.message.map.MapMessageTest

This class tests the MapMessage message type.

testCase

Verifies that field names are case sensitive NOTE: this is not explicitly mentioned in the specification, but is in keeping with property name requirements

Requirements
message.map.case MapMessage field names are case sensitive.

NOTE: the specification does not explicitly mention this requirement, but it is in keeping with property name requirements.

testConversion

Verifies valid conversions for all types except String (this is handled by testStringConversion()).

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testGetMapNames

Verifies that getMapNames() returns a name for each element in the set

Requirements
message.map.method.getMapNames Refer to javadoc

testInvalidConversion

Verifies that attempting to perform invalid invalid conversions throws MessageFormatException.

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testInvalidNumericConversion

Verifies that attempting to perform invalid invalid string to numeric conversions throws NumberFormatException

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
String X X X   X X X X X  
byte[ ]                   X

testInvalidObject

Verifies that attempting to set an invalid object using the setObject() method throws MessageFormatException

Requirements
message.map.method.setObject Refer to javadoc

testItemExists

Verifies the behaviour of the itemExists() method

Requirements
message.map.method.itemExists Refer to javadoc

testMap

Verifies that elements populated in a map are identical to those retrieved

Requirements
message.map A MapMessage is a message whose body contains a set of name-value pairs where names are Strings and values are Java primitive types. The entries can be accessed sequentially by enumerator or randomly by name. The order of the entries is undefined.

testNullConversion

Verifies behaviour of conversions from null

Requirements
message.map.null For MapMessage, attempting to read a null value as a Java primitive type must be treated as calling the primitive's corresponding valueOf(String) conversion method with a null value. Since char does not support a String conversion, attempting to read a null value as a char must throw NullPointerException.

testSetObject

Verifi es that setObject() can handle all supported types

Requirements
message.map.method.setObject Refer to javadoc

testStringConversion

Verifies valid string conversions

Requirements
message.map.conversion MapMessage supports the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric's valueOf() method does not accept the String value as a valid representation. MapMessage must implement the String to boolean conversion as specified by the valueOf(String) method of Boolean as defined by the Java language.

A value written as the row type can be read as the column type.

  boolean byte short char int long float double String byte[ ]
boolean X               X  
byte   X X   X X