use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadLongFromShort.
@Test
public void testReadLongFromShort() throws Exception {
short value = RandomUtil.randomShort();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeShort(value);
message.reset();
Assert.assertEquals(value, message.readLong());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadStringFromNullString.
@Test
public void testReadStringFromNullString() throws Exception {
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeString(null);
message.reset();
Assert.assertNull(message.readString());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadDoubleFromDouble.
@Test
public void testReadDoubleFromDouble() throws Exception {
double value = RandomUtil.randomDouble();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeDouble(value);
message.reset();
Assert.assertEquals(value, message.readDouble(), 0.000001);
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadShortFromShort.
@Test
public void testReadShortFromShort() throws Exception {
short value = RandomUtil.randomShort();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeShort(value);
message.reset();
Assert.assertEquals(value, message.readShort());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadShortFromByte.
@Test
public void testReadShortFromByte() throws Exception {
byte value = RandomUtil.randomByte();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeByte(value);
message.reset();
Assert.assertEquals(value, message.readShort());
}
Aggregations