Class MessagePropertyTest
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.message.properties.MessagePropertyTest
- All Implemented Interfaces:
junit.framework.Test
Test the
See JMS Specification, sec. 3.5 Message Properties (p.32-37)
jakarta.jms.Message properties.
See JMS Specification, sec. 3.5 Message Properties (p.32-37)
- Version:
- $Id: MessagePropertyTest.java,v 1.1 2007/03/29 04:28:34 starksm 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 theMessage.clearProperties()method deletes all the properties of the Message.voidTest that theMessage.clearProperties()method does not clear the value of the Message's body.voidTest that an attempt to get abooleanproperty which does not exist returnsfalsevoidTest that an attempt to get abyteproperty which does not exist throw ajava.lang.NumberFormatExceptionvoidTest that an attempt to get adoubleproperty which does not exist throw ajava.lang.NullPointerExceptionvoidTest that an attempt to get afloatproperty which does not exist throw ajava.lang.NullPointerExceptionvoidTest that an attempt to get aintproperty which does not exist throw ajava.lang.NumberFormatExceptionvoidTest that an attempt to get alongproperty which does not exist throw ajava.lang.NumberFormatExceptionvoidTest that anullvalue is returned by theMessage.getObjectProperty()method if a property by the specified name does not exits.voidTest that theMessage.getPropertyNames()method does not return the name of the JMS standard header fields (e.g.voidTest that an attempt to get ashortproperty which does not exist throw ajava.lang.NumberFormatExceptionvoidTest that anullvalue is returned by theMessage.getStringProperty()method if a property by the specified name does not exits.voidTest that theMessage.getPropertyNames()methods.voidif a property is set as aFloatwith theMessage.setObjectProperty()method, it can be retrieve directly as adoublebyMessage.getFloatProperty()voidTest that any other class thanBoolean, Byte, Short, Integer, Long, Float, DoubleandStringused in theMessage.setObjectProperty()method throws ajakarta.jms.MessageFormatException.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
-
MessagePropertyTest
-
-
Method Details
-
testSetObjectProperty_2
public void testSetObjectProperty_2()Test that any other class thanBoolean, Byte, Short, Integer, Long, Float, DoubleandStringused in theMessage.setObjectProperty()method throws ajakarta.jms.MessageFormatException. -
testSetObjectProperty_1
public void testSetObjectProperty_1()if a property is set as aFloatwith theMessage.setObjectProperty()method, it can be retrieve directly as adoublebyMessage.getFloatProperty() -
testGetObjectProperty
public void testGetObjectProperty()Test that anullvalue is returned by theMessage.getObjectProperty()method if a property by the specified name does not exits. -
testGetStringProperty
public void testGetStringProperty()Test that anullvalue is returned by theMessage.getStringProperty()method if a property by the specified name does not exits. -
testGetDoubleProperty
public void testGetDoubleProperty()Test that an attempt to get adoubleproperty which does not exist throw ajava.lang.NullPointerException -
testGetFloatProperty
public void testGetFloatProperty()Test that an attempt to get afloatproperty which does not exist throw ajava.lang.NullPointerException -
testGetLongProperty
public void testGetLongProperty()Test that an attempt to get alongproperty which does not exist throw ajava.lang.NumberFormatException -
testGetIntProperty
public void testGetIntProperty()Test that an attempt to get aintproperty which does not exist throw ajava.lang.NumberFormatException -
testGetShortProperty
public void testGetShortProperty()Test that an attempt to get ashortproperty which does not exist throw ajava.lang.NumberFormatException -
testGetByteProperty
public void testGetByteProperty()Test that an attempt to get abyteproperty which does not exist throw ajava.lang.NumberFormatException -
testGetBooleanProperty
public void testGetBooleanProperty()Test that an attempt to get abooleanproperty which does not exist returnsfalse -
testGetPropertyNames
public void testGetPropertyNames()Test that theMessage.getPropertyNames()method does not return the name of the JMS standard header fields (e.g.JMSCorrelationID). -
testPropertyIteration
public void testPropertyIteration()Test that theMessage.getPropertyNames()methods. -
testClearProperties_2
public void testClearProperties_2()Test that theMessage.clearProperties()method does not clear the value of the Message's body. -
testClearProperties_1
public void testClearProperties_1()Test that theMessage.clearProperties()method deletes all the properties of the Message. -
suite
public static junit.framework.Test suite()Method to use this class in a Test suite
-