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

public class MessagePropertyTest extends PTPTestCase
Test the 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.JMSTestCase

    admin, PROP_FILE_NAME, startServer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static junit.framework.Test
    Method to use this class in a Test suite
    void
    Test that the Message.clearProperties() method deletes all the properties of the Message.
    void
    Test that the Message.clearProperties() method does not clear the value of the Message's body.
    void
    Test that an attempt to get a boolean property which does not exist returns false
    void
    Test that an attempt to get a byte property which does not exist throw a java.lang.NumberFormatException
    void
    Test that an attempt to get a double property which does not exist throw a java.lang.NullPointerException
    void
    Test that an attempt to get a float property which does not exist throw a java.lang.NullPointerException
    void
    Test that an attempt to get a int property which does not exist throw a java.lang.NumberFormatException
    void
    Test that an attempt to get a long property which does not exist throw a java.lang.NumberFormatException
    void
    Test that a null value is returned by the Message.getObjectProperty() method if a property by the specified name does not exits.
    void
    Test that the Message.getPropertyNames() method does not return the name of the JMS standard header fields (e.g.
    void
    Test that an attempt to get a short property which does not exist throw a java.lang.NumberFormatException
    void
    Test that a null value is returned by the Message.getStringProperty() method if a property by the specified name does not exits.
    void
    Test that the Message.getPropertyNames() methods.
    void
    if a property is set as a Float with the Message.setObjectProperty() method, it can be retrieve directly as a double by Message.getFloatProperty()
    void
    Test that any other class than Boolean, Byte, Short, Integer, Long, Float, Double and String used in the Message.setObjectProperty() method throws a jakarta.jms.MessageFormatException.

    Methods inherited from class org.objectweb.jtests.jms.framework.PTPTestCase

    setUp, tearDown

    Methods inherited from class org.objectweb.jtests.jms.framework.JMSTestCase

    fail, getProviderProperties

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MessagePropertyTest

      public MessagePropertyTest(String name)
  • Method Details

    • testSetObjectProperty_2

      public void testSetObjectProperty_2()
      Test that any other class than Boolean, Byte, Short, Integer, Long, Float, Double and String used in the Message.setObjectProperty() method throws a jakarta.jms.MessageFormatException.
    • testSetObjectProperty_1

      public void testSetObjectProperty_1()
      if a property is set as a Float with the Message.setObjectProperty() method, it can be retrieve directly as a double by Message.getFloatProperty()
    • testGetObjectProperty

      public void testGetObjectProperty()
      Test that a null value is returned by the Message.getObjectProperty() method if a property by the specified name does not exits.
    • testGetStringProperty

      public void testGetStringProperty()
      Test that a null value is returned by the Message.getStringProperty() method if a property by the specified name does not exits.
    • testGetDoubleProperty

      public void testGetDoubleProperty()
      Test that an attempt to get a double property which does not exist throw a java.lang.NullPointerException
    • testGetFloatProperty

      public void testGetFloatProperty()
      Test that an attempt to get a float property which does not exist throw a java.lang.NullPointerException
    • testGetLongProperty

      public void testGetLongProperty()
      Test that an attempt to get a long property which does not exist throw a java.lang.NumberFormatException
    • testGetIntProperty

      public void testGetIntProperty()
      Test that an attempt to get a int property which does not exist throw a java.lang.NumberFormatException
    • testGetShortProperty

      public void testGetShortProperty()
      Test that an attempt to get a short property which does not exist throw a java.lang.NumberFormatException
    • testGetByteProperty

      public void testGetByteProperty()
      Test that an attempt to get a byte property which does not exist throw a java.lang.NumberFormatException
    • testGetBooleanProperty

      public void testGetBooleanProperty()
      Test that an attempt to get a boolean property which does not exist returns false
    • testGetPropertyNames

      public void testGetPropertyNames()
      Test that the Message.getPropertyNames() method does not return the name of the JMS standard header fields (e.g. JMSCorrelationID).
    • testPropertyIteration

      public void testPropertyIteration()
      Test that the Message.getPropertyNames() methods.
    • testClearProperties_2

      public void testClearProperties_2()
      Test that the Message.clearProperties() method does not clear the value of the Message's body.
    • testClearProperties_1

      public void testClearProperties_1()
      Test that the Message.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