Examples of JMSMapMessage


Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testFailedIntPropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.getIntProperty("random");
            Assert.fail("NumberFormatException should be received.");
        }
        catch (NumberFormatException e)
        {
            //normal execution
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testFailedLongPropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.getLongProperty("random");
            Assert.fail("NumberFormatException should be received.");
        }
        catch (NumberFormatException e)
        {
            //normal execution
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testFailedShortPropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.getShortProperty("random");
            Assert.fail("NumberFormatException should be received.");
        }
        catch (NumberFormatException e)
        {
            //normal execution
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testBooleanLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();

            mm.setBoolean("value", true);
            Assert.assertEquals(true, mm.getBoolean("value"));
            Assert.assertEquals("true", mm.getString("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testByteLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.setByte("value", Byte.MAX_VALUE);

            Assert.assertEquals(Byte.MAX_VALUE, mm.getByte("value"));
            Assert.assertEquals((short) Byte.MAX_VALUE, mm.getShort("value"));
            Assert.assertEquals(Byte.MAX_VALUE, mm.getInt("value"));
            Assert.assertEquals((long) Byte.MAX_VALUE, mm.getLong("value"));
            Assert.assertEquals("" + Byte.MAX_VALUE, mm.getString("value"));

        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testShortLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.setShort("value", Short.MAX_VALUE);
            Assert.assertEquals(Short.MAX_VALUE, mm.getShort("value"));
            Assert.assertEquals((int) Short.MAX_VALUE, mm.getInt("value"));
            Assert.assertEquals((long) Short.MAX_VALUE, mm.getLong("value"));
            Assert.assertEquals("" + Short.MAX_VALUE, mm.getString("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testCharLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();

            mm.setChar("value", 'c');
            Assert.assertEquals('c', mm.getChar("value"));
            Assert.assertEquals("c", mm.getString("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }

        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();

            mm.setString("value", null);
            mm.getChar("value");
            fail("Expected NullPointerException");

        }
        catch (NullPointerException e)
        {
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testDoubleLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.setDouble("value", Double.MAX_VALUE);
            Assert.assertEquals(Double.MAX_VALUE, mm.getDouble("value"));
            Assert.assertEquals("" + Double.MAX_VALUE, mm.getString("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testFloatLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.setFloat("value", Float.MAX_VALUE);
            Assert.assertEquals(Float.MAX_VALUE, mm.getFloat("value"));
            Assert.assertEquals((double) Float.MAX_VALUE, mm.getDouble("value"));
            Assert.assertEquals("" + Float.MAX_VALUE, mm.getString("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here

Examples of org.apache.qpid.client.message.JMSMapMessage

    public void testIntLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.setInt("value", Integer.MAX_VALUE);
            Assert.assertEquals(Integer.MAX_VALUE, mm.getInt("value"));
            Assert.assertEquals((long) Integer.MAX_VALUE, mm.getLong("value"));
            Assert.assertEquals("" + Integer.MAX_VALUE, mm.getString("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.