use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetBooleanFromNull.
@Test
public void testGetBooleanFromNull() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
Assert.assertEquals(false, message.getBoolean(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetFloatFromString.
@Test
public void testGetFloatFromString() throws Exception {
float value = RandomUtil.randomFloat();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setString(itemName, Float.toString(value));
Assert.assertEquals(value, message.getFloat(itemName), 0.000001);
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetByteFromNull.
@Test
public void testGetByteFromNull() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
try {
message.getByte(itemName);
Assert.fail("NumberFormatException");
} catch (NumberFormatException e) {
}
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetIntFromNull.
@Test
public void testGetIntFromNull() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
try {
message.getInt(itemName);
Assert.fail("NumberFormatException");
} catch (NumberFormatException e) {
}
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetStringFromShort.
@Test
public void testGetStringFromShort() throws Exception {
short value = RandomUtil.randomShort();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setShort(itemName, value);
Assert.assertEquals(Short.toString(value), message.getString(itemName));
}
Aggregations