Package org.apache.qpid.client.message

Examples of org.apache.qpid.client.message.JMSStreamMessage.reset()


    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeFloat(6.2f);
        bm.reset();
        assertEquals(6.2d, bm.readDouble(), 0.01);
        bm.reset();
        assertEquals("6.2", bm.readString());
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 1, 2, 3, 4, 5, 9});
    }
View Full Code Here


        bm.writeFloat(6.2f);
        bm.reset();
        assertEquals(6.2d, bm.readDouble(), 0.01);
        bm.reset();
        assertEquals("6.2", bm.readString());
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 1, 2, 3, 4, 5, 9});
    }

    public void testDoubleConversions() throws Exception
    {
View Full Code Here

    public void testDoubleConversions() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeDouble(88.35d);
        bm.reset();
        assertEquals("88.35", bm.readString());
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 1, 2, 3, 4, 5, 6, 9});
    }
View Full Code Here

    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeDouble(88.35d);
        bm.reset();
        assertEquals("88.35", bm.readString());
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 1, 2, 3, 4, 5, 6, 9});
    }

    public void testStringConversions() throws Exception
    {
View Full Code Here

    public void testStringConversions() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("true");
        bm.reset();
        assertEquals(true, bm.readBoolean());
        bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("2");
        bm.reset();
        assertEquals((byte)2, bm.readByte());
View Full Code Here

        bm.writeString("true");
        bm.reset();
        assertEquals(true, bm.readBoolean());
        bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("2");
        bm.reset();
        assertEquals((byte)2, bm.readByte());
        bm.reset();
        assertEquals((short)2, bm.readShort());
        bm.reset();
        assertEquals(2, bm.readInt());
View Full Code Here

        assertEquals(true, bm.readBoolean());
        bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("2");
        bm.reset();
        assertEquals((byte)2, bm.readByte());
        bm.reset();
        assertEquals((short)2, bm.readShort());
        bm.reset();
        assertEquals(2, bm.readInt());
        bm.reset();
        assertEquals((long)2, bm.readLong());
View Full Code Here

        bm.writeString("2");
        bm.reset();
        assertEquals((byte)2, bm.readByte());
        bm.reset();
        assertEquals((short)2, bm.readShort());
        bm.reset();
        assertEquals(2, bm.readInt());
        bm.reset();
        assertEquals((long)2, bm.readLong());
        bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("5.7");
View Full Code Here

        assertEquals((byte)2, bm.readByte());
        bm.reset();
        assertEquals((short)2, bm.readShort());
        bm.reset();
        assertEquals(2, bm.readInt());
        bm.reset();
        assertEquals((long)2, bm.readLong());
        bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("5.7");
        bm.reset();
        assertEquals(5.7f, bm.readFloat());
View Full Code Here

        assertEquals(2, bm.readInt());
        bm.reset();
        assertEquals((long)2, bm.readLong());
        bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("5.7");
        bm.reset();
        assertEquals(5.7f, bm.readFloat());
        bm.reset();
        assertEquals(5.7d, bm.readDouble());
    }
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.