Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQStreamMessage


   }

   public void testReadLongFromShort() throws Exception
   {
      short value = RandomUtil.randomShort();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeShort(value);
      message.reset();

      Assert.assertEquals(value, message.readLong());
   }
View Full Code Here


   }

   public void testReadLongFromInt() throws Exception
   {
      int value = RandomUtil.randomInt();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeInt(value);
      message.reset();

      Assert.assertEquals(value, message.readLong());
   }
View Full Code Here

   }

   public void testReadLongFromLong() throws Exception
   {
      long value = RandomUtil.randomLong();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeLong(value);
      message.reset();

      Assert.assertEquals(value, message.readLong());
   }
View Full Code Here

   }

   public void testReadLongFromString() throws Exception
   {
      long value = RandomUtil.randomLong();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeString(Long.toString(value));
      message.reset();

      Assert.assertEquals(value, message.readLong());
   }
View Full Code Here

   }

   public void testReadFloatFromFloat() throws Exception
   {
      float value = RandomUtil.randomFloat();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeFloat(value);
      message.reset();

      Assert.assertEquals(value, message.readFloat());
   }
View Full Code Here

   }

   public void testReadFloatFromString() throws Exception
   {
      float value = RandomUtil.randomFloat();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeString(Float.toString(value));
      message.reset();

      Assert.assertEquals(value, message.readFloat());
   }
View Full Code Here

   }

   public void testReadDoubleFromFloat() throws Exception
   {
      float value = RandomUtil.randomFloat();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeFloat(value);
      message.reset();

      Assert.assertEquals(Float.valueOf(value).doubleValue(), message.readDouble());
   }
View Full Code Here

   }

   public void testReadDoubleFromDouble() throws Exception
   {
      double value = RandomUtil.randomDouble();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeDouble(value);
      message.reset();

      Assert.assertEquals(value, message.readDouble());
   }
View Full Code Here

   }

   public void testReadDoubleFromString() throws Exception
   {
      double value = RandomUtil.randomDouble();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeString(Double.toString(value));
      message.reset();

      Assert.assertEquals(value, message.readDouble());
   }
View Full Code Here

   }

   public void testReadStringFromBoolean() throws Exception
   {
      boolean value = RandomUtil.randomBoolean();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeBoolean(value);
      message.reset();

      Assert.assertEquals(Boolean.toString(value), message.readString());
   }
View Full Code Here

TOP

Related Classes of org.hornetq.jms.client.HornetQStreamMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.