use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetCharFromChar.
@Test
public void testGetCharFromChar() throws Exception {
char value = RandomUtil.randomChar();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setChar(itemName, value);
Assert.assertEquals(value, message.getChar(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetShortFromShort.
@Test
public void testGetShortFromShort() throws Exception {
short value = RandomUtil.randomShort();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setShort(itemName, value);
Assert.assertEquals(value, message.getShort(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetByteFromByte.
@Test
public void testGetByteFromByte() throws Exception {
byte value = RandomUtil.randomByte();
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setByte(itemName, value);
Assert.assertEquals(value, message.getByte(itemName));
}
use of org.apache.activemq.artemis.jms.client.ActiveMQMapMessage in project activemq-artemis by apache.
the class ActiveMQMapMessageTest method testGetFloatFromNull.
@Test
public void testGetFloatFromNull() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
try {
message.getFloat(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 testGetBytesFromInvalidType.
@Test
public void testGetBytesFromInvalidType() throws Exception {
ActiveMQMapMessage message = new ActiveMQMapMessage();
message.setChar(itemName, RandomUtil.randomChar());
try {
message.getBytes(itemName);
Assert.fail("MessageFormatException");
} catch (MessageFormatException e) {
}
}
Aggregations