use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetStringFromNull.
@Test
public void testGetStringFromNull() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
Assert.assertNull(message.getString(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetIntFromInvalidType.
@Test
public void testGetIntFromInvalidType() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setFloat(itemName, RandomUtil.randomFloat());
try {
message.getInt(itemName);
Assert.fail("MessageFormatException");
} catch (MessageFormatException e) {
}
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetByteFromInvalidType.
@Test
public void testGetByteFromInvalidType() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setFloat(itemName, RandomUtil.randomFloat());
try {
message.getByte(itemName);
Assert.fail("MessageFormatException");
} catch (MessageFormatException e) {
}
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetDoubleFromInvalidType.
@Test
public void testGetDoubleFromInvalidType() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setChar(itemName, RandomUtil.randomChar());
try {
message.getDouble(itemName);
Assert.fail("MessageFormatException");
} catch (MessageFormatException e) {
}
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetLongFromByte.
@Test
public void testGetLongFromByte() throws Exception {
byte value = RandomUtil.randomByte();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setByte(itemName, value);
Assert.assertEquals(value, message.getLong(itemName));
}
Aggregations