use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadStringFromString.
@Test
public void testReadStringFromString() throws Exception {
String value = RandomUtil.randomString();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeString(value);
message.reset();
Assert.assertEquals(value, message.readString());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadIntFromInt.
@Test
public void testReadIntFromInt() throws Exception {
int value = RandomUtil.randomInt();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeInt(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 testReadFloatFromString.
@Test
public void testReadFloatFromString() throws Exception {
float value = RandomUtil.randomFloat();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeString(Float.toString(value));
message.reset();
Assert.assertEquals(value, message.readFloat(), 0.000001);
}
use of org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage in project activemq-artemis by apache.
the class ActiveMQStreamMessageTest method testReadLongFromByte.
@Test
public void testReadLongFromByte() throws Exception {
byte value = RandomUtil.randomByte();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeByte(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 testReadObjectFromFloat.
@Test
public void testReadObjectFromFloat() throws Exception {
float value = RandomUtil.randomFloat();
ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.writeFloat(value);
message.reset();
Assert.assertEquals(value, message.readObject());
}
Aggregations