use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetBytesFromNull.
@Test
public void testGetBytesFromNull() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
Assert.assertNull(message.getBytes(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetStringFromLong.
@Test
public void testGetStringFromLong() throws Exception {
long value = RandomUtil.randomLong();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setLong(itemName, value);
Assert.assertEquals(Long.toString(value), message.getString(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetDoubleFromNull.
@Test
public void testGetDoubleFromNull() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
try {
message.getDouble(itemName);
Assert.fail("NullPointerException");
} catch (NullPointerException e) {
}
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetLongFromLong.
@Test
public void testGetLongFromLong() throws Exception {
long value = RandomUtil.randomLong();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setLong(itemName, value);
Assert.assertEquals(value, message.getLong(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetStringFromString.
@Test
public void testGetStringFromString() throws Exception {
String value = RandomUtil.randomString();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setString(itemName, value);
Assert.assertEquals(value, message.getString(itemName));
}
Aggregations