Package org.apache.activemq.command

Examples of org.apache.activemq.command.ActiveMQStreamMessage.reset()


    public void testReadShort() {
        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
        try {
            short test = (short) 4;
            msg.writeShort(test);
            msg.reset();
            assertTrue(msg.readShort() == test);
            msg.reset();
            assertTrue(msg.readInt() == test);
            msg.reset();
            assertTrue(msg.readLong() == test);
View Full Code Here


        try {
            short test = (short) 4;
            msg.writeShort(test);
            msg.reset();
            assertTrue(msg.readShort() == test);
            msg.reset();
            assertTrue(msg.readInt() == test);
            msg.reset();
            assertTrue(msg.readLong() == test);
            msg.reset();
            assertTrue(msg.readString().equals(new Short(test).toString()));
View Full Code Here

            msg.writeShort(test);
            msg.reset();
            assertTrue(msg.readShort() == test);
            msg.reset();
            assertTrue(msg.readInt() == test);
            msg.reset();
            assertTrue(msg.readLong() == test);
            msg.reset();
            assertTrue(msg.readString().equals(new Short(test).toString()));
            msg.reset();
            try {
View Full Code Here

            assertTrue(msg.readShort() == test);
            msg.reset();
            assertTrue(msg.readInt() == test);
            msg.reset();
            assertTrue(msg.readLong() == test);
            msg.reset();
            assertTrue(msg.readString().equals(new Short(test).toString()));
            msg.reset();
            try {
                msg.readBoolean();
                fail("Should have thrown exception");
View Full Code Here

            assertTrue(msg.readInt() == test);
            msg.reset();
            assertTrue(msg.readLong() == test);
            msg.reset();
            assertTrue(msg.readString().equals(new Short(test).toString()));
            msg.reset();
            try {
                msg.readBoolean();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
View Full Code Here

            try {
                msg.readBoolean();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readByte();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
View Full Code Here

            try {
                msg.readByte();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readFloat();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
View Full Code Here

            try {
                msg.readFloat();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readDouble();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
View Full Code Here

            try {
                msg.readDouble();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readChar();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
View Full Code Here

            try {
                msg.readChar();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readBytes(new byte[1]);
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
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.