Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQStreamMessage


   }

   public void testReadBytesFromBytes() throws Exception
   {
      byte[] value = RandomUtil.randomBytes();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeBytes(value);
      message.reset();

      byte[] v = new byte[value.length];
      message.readBytes(v);

      UnitTestCase.assertEqualsByteArrays(value, v);
   }
View Full Code Here


   }

   public void testReadBytesFromBytes_2() throws Exception
   {
      byte[] value = RandomUtil.randomBytes(512);
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeBytes(value, 0, 256);
      message.reset();

      byte[] v = new byte[256];
      message.readBytes(v);

      UnitTestCase.assertEqualsByteArrays(256, value, v);
   }
View Full Code Here

   }

   public void testReadShortFromByte() throws Exception
   {
      byte value = RandomUtil.randomByte();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeByte(value);
      message.reset();

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

   }

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

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

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

   }

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

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

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

   }

   public void testReadIntFromByte() throws Exception
   {
      byte value = RandomUtil.randomByte();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeByte(value);
      message.reset();

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

   }

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

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

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

   }

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

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

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

   }

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

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

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

   }

   public void testReadCharFromChar() throws Exception
   {
      char value = RandomUtil.randomChar();
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeChar(value);
      message.reset();

      Assert.assertEquals(value, message.readChar());
   }
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.