Examples of JMSMapMessage


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

            msg.setAMQSession(this);
            return msg;
        }
        else
        {
            JMSMapMessage msg = new JMSMapMessage(getMessageDelegateFactory());
            msg.setAMQSession(this);
            return msg;
        }
    }
View Full Code Here

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

    public void testIntPropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.setIntProperty("value", Integer.MAX_VALUE);
            Assert.assertEquals(Integer.MAX_VALUE, mm.getIntProperty("value"));
            Assert.assertEquals((long) Integer.MAX_VALUE, mm.getLongProperty("value"));
            Assert.assertEquals("" + Integer.MAX_VALUE, mm.getStringProperty("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here

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

    public void testLongPropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.setLongProperty("value", Long.MAX_VALUE);
            Assert.assertEquals(Long.MAX_VALUE, mm.getLongProperty("value"));
            Assert.assertEquals("" + Long.MAX_VALUE, mm.getStringProperty("value"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here

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

    public void testFailedBooleanPropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            Assert.assertEquals(false, mm.getBooleanProperty("int"));
        }
        catch (JMSException e)
        {
            Assert.fail("JMSException received." + e);
        }
View Full Code Here

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

    public void testFailedBytePropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.getByteProperty("random");
            Assert.fail("NumberFormatException expected");
        }
        catch (NumberFormatException e)
        {
            //normal execution
View Full Code Here

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

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

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

    public void testFailedFloatPropertyLookup()
    {
        try
        {
            JMSMapMessage mm = TestMessageHelper.newJMSMapMessage();
            mm.getFloatProperty("random");
            Assert.fail("NullPointerException should be received.");
        }
        catch (NullPointerException e)
        {
            //normal execution
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.