Search in sources :

Example 46 with ActiveMQMapMessage

use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.

the class ActiveMQMapMessageTest method testGetIntFromShort.

@Test
public void testGetIntFromShort() throws Exception {
    short value = RandomUtil.randomShort();
    ActiveMQMapMessage message = new ActiveMQMapMessage();
    message.setShort(itemName, value);
    Assert.assertEquals(value, message.getInt(itemName));
}
Also used : ActiveMQMapMessage(org.apache.activemq.artemis.jms.client.ActiveMQMapMessage) Test(org.junit.Test)

Example 47 with ActiveMQMapMessage

use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.

the class ActiveMQMapMessageTest method testGetIntFromInt.

@Test
public void testGetIntFromInt() throws Exception {
    int value = RandomUtil.randomInt();
    ActiveMQMapMessage message = new ActiveMQMapMessage();
    message.setInt(itemName, value);
    Assert.assertEquals(value, message.getInt(itemName));
}
Also used : ActiveMQMapMessage(org.apache.activemq.artemis.jms.client.ActiveMQMapMessage) Test(org.junit.Test)

Example 48 with ActiveMQMapMessage

use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.

the class ActiveMQMapMessageTest method testGetIntFromByte.

@Test
public void testGetIntFromByte() throws Exception {
    byte value = RandomUtil.randomByte();
    ActiveMQMapMessage message = new ActiveMQMapMessage();
    message.setByte(itemName, value);
    Assert.assertEquals(value, message.getInt(itemName));
}
Also used : ActiveMQMapMessage(org.apache.activemq.artemis.jms.client.ActiveMQMapMessage) Test(org.junit.Test)

Example 49 with ActiveMQMapMessage

use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.

the class ActiveMQMapMessageTest method doTestSetObject.

private void doTestSetObject(final Object value) throws Exception {
    ActiveMQMapMessage message = new ActiveMQMapMessage();
    message.setObject(itemName, value);
    Assert.assertEquals(value, message.getObject(itemName));
}
Also used : ActiveMQMapMessage(org.apache.activemq.artemis.jms.client.ActiveMQMapMessage)

Example 50 with ActiveMQMapMessage

use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.

the class ActiveMQMapMessageTest method testGetType.

@Test
public void testGetType() throws Exception {
    ActiveMQMapMessage message = new ActiveMQMapMessage();
    Assert.assertEquals(ActiveMQMapMessage.TYPE, message.getType());
}
Also used : ActiveMQMapMessage(org.apache.activemq.artemis.jms.client.ActiveMQMapMessage) Test(org.junit.Test)

Aggregations

ActiveMQMapMessage (org.apache.activemq.artemis.jms.client.ActiveMQMapMessage)58 Test (org.junit.Test)57 MessageFormatException (javax.jms.MessageFormatException)9 MapMessage (javax.jms.MapMessage)1 ClientMessage (org.apache.activemq.artemis.api.core.client.ClientMessage)1 ClientSession (org.apache.activemq.artemis.api.core.client.ClientSession)1 ClientMessageImpl (org.apache.activemq.artemis.core.client.impl.ClientMessageImpl)1