Package org.apache.qpid.client.message

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


    }

    public void testToBodyStringWithNull() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.reset();
        String result = bm.toBodyString();
        assertNull(result);
    }

    private void checkConversionsFail(StreamMessage sm, int[] conversions) throws JMSException
View Full Code Here


    }
    public void testBooleanConversions() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeBoolean(true);
        bm.reset();
        String result = bm.readString();
        assertEquals("true", result);
        bm.reset();
        checkConversionsFail(bm, new int[]{1,2,3,4,5,6,7,9});
    }
View Full Code Here

        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeBoolean(true);
        bm.reset();
        String result = bm.readString();
        assertEquals("true", result);
        bm.reset();
        checkConversionsFail(bm, new int[]{1,2,3,4,5,6,7,9});
    }

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

    public void testByteConversions() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeByte((byte) 43);
        bm.reset();
        assertEquals(43, bm.readShort());
        bm.reset();
        assertEquals(43, bm.readInt());
        bm.reset();
        assertEquals(43, bm.readLong());
View Full Code Here

    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeByte((byte) 43);
        bm.reset();
        assertEquals(43, bm.readShort());
        bm.reset();
        assertEquals(43, bm.readInt());
        bm.reset();
        assertEquals(43, bm.readLong());
        bm.reset();
        String result = bm.readString();
View Full Code Here

        bm.writeByte((byte) 43);
        bm.reset();
        assertEquals(43, bm.readShort());
        bm.reset();
        assertEquals(43, bm.readInt());
        bm.reset();
        assertEquals(43, bm.readLong());
        bm.reset();
        String result = bm.readString();
        assertEquals("43", result);
        bm.reset();
View Full Code Here

        assertEquals(43, bm.readShort());
        bm.reset();
        assertEquals(43, bm.readInt());
        bm.reset();
        assertEquals(43, bm.readLong());
        bm.reset();
        String result = bm.readString();
        assertEquals("43", result);
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 3, 6, 7, 9});
    }
View Full Code Here

        bm.reset();
        assertEquals(43, bm.readLong());
        bm.reset();
        String result = bm.readString();
        assertEquals("43", result);
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 3, 6, 7, 9});
    }

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

    public void testShortConversions() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeShort((short) 87);
        bm.reset();
        assertEquals(87, bm.readInt());
        bm.reset();
        assertEquals(87, bm.readLong());
        bm.reset();
        assertEquals("87", bm.readString());
View Full Code Here

    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeShort((short) 87);
        bm.reset();
        assertEquals(87, bm.readInt());
        bm.reset();
        assertEquals(87, bm.readLong());
        bm.reset();
        assertEquals("87", bm.readString());
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 1, 3, 6, 7, });
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.