use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadStringFromFloat.
@Test
public void testReadStringFromFloat() throws Exception {
float value = RandomUtil.randomFloat();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeFloat(value);
message.reset();
Assert.assertEquals(Float.toString(value), message.readString());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadIntFromByte.
@Test
public void testReadIntFromByte() throws Exception {
byte value = RandomUtil.randomByte();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeByte(value);
message.reset();
Assert.assertEquals(value, message.readInt());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadByteFromByte.
@Test
public void testReadByteFromByte() throws Exception {
byte value = RandomUtil.randomByte();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeByte(value);
message.reset();
Assert.assertEquals(value, message.readByte());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadShortFromString.
@Test
public void testReadShortFromString() throws Exception {
short value = RandomUtil.randomShort();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeString(Short.toString(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 testReadIntFromShort.
@Test
public void testReadIntFromShort() throws Exception {
short value = RandomUtil.randomShort();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeShort(value);
message.reset();
Assert.assertEquals(value, message.readInt());
}
Aggregations