Package org.apache.activemq.command

Examples of org.apache.activemq.command.ActiveMQMapMessage.copy()


        }
        String bigString = bigSB.toString();
       
        msg.setString("bigString", bigString);
       
        msg = (ActiveMQMapMessage) msg.copy();
       
        assertEquals(msg.getBoolean("boolean"), true);
        assertEquals(msg.getByte("byte"), (byte) 1);
        assertEquals(msg.getBytes("bytes").length, 1);
        assertEquals(msg.getChar("char"), 'a');
View Full Code Here


        msg.setReadOnlyBody(true);
        assertTrue(msg.getBoolean(name));
        msg.clearBody();
        msg.setString(name, "true");
       
        msg = (ActiveMQMapMessage) msg.copy();
       
        assertTrue(msg.getBoolean(name));
    }

    public void testGetByte() throws JMSException {
View Full Code Here

    }

    public void testGetByte() throws JMSException {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        msg.setByte(this.name, (byte) 1);
        msg = (ActiveMQMapMessage) msg.copy();
        assertTrue(msg.getByte(this.name) == (byte) 1);
    }

    public void testGetShort() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
View Full Code Here

    public void testGetShort() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        try {
            msg.setShort(this.name, (short) 1);
            msg = (ActiveMQMapMessage) msg.copy();
            assertTrue(msg.getShort(this.name) == (short) 1);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

    public void testGetChar() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        try {
            msg.setChar(this.name, 'a');
            msg = (ActiveMQMapMessage) msg.copy();
            assertTrue(msg.getChar(this.name) == 'a');
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

    public void testGetInt() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        try {
            msg.setInt(this.name, 1);
            msg = (ActiveMQMapMessage) msg.copy();
            assertTrue(msg.getInt(this.name) == 1);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

    public void testGetLong() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        try {
            msg.setLong(this.name, 1);
            msg = (ActiveMQMapMessage) msg.copy();
            assertTrue(msg.getLong(this.name) == 1);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

    public void testGetFloat() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        try {
            msg.setFloat(this.name, 1.5f);
            msg = (ActiveMQMapMessage) msg.copy();
            assertTrue(msg.getFloat(this.name) == 1.5f);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

    public void testGetDouble() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        try {
            msg.setDouble(this.name, 1.5);
            msg = (ActiveMQMapMessage) msg.copy();
            assertTrue(msg.getDouble(this.name) == 1.5);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

    public void testGetString() {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        try {
            String str = "test";
            msg.setString(this.name, str);
            msg = (ActiveMQMapMessage) msg.copy();
            assertEquals(msg.getString(this.name), str);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
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.