Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQStreamMessage


      StreamMessage foreignStreamMessage = new SimpleJMSStreamMessage();
      foreignStreamMessage.writeByte((byte)1);
      foreignStreamMessage.writeByte((byte)2);
      foreignStreamMessage.writeByte((byte)3);

      HornetQStreamMessage copy = new HornetQStreamMessage(foreignStreamMessage, session);

      MessageHeaderTestBase.ensureEquivalent(foreignStreamMessage, copy);
   }
View Full Code Here


      StreamMessage foreignStreamMessage = new SimpleJMSStreamMessage();
      foreignStreamMessage.writeByte((byte)1);
      foreignStreamMessage.writeByte((byte)2);
      foreignStreamMessage.writeByte((byte)3);

      HornetQStreamMessage copy = new HornetQStreamMessage(foreignStreamMessage, session);

      MessageHeaderTestBase.ensureEquivalent(foreignStreamMessage, copy);
   }
View Full Code Here

      StreamMessage foreignStreamMessage = new SimpleJMSStreamMessage();
      foreignStreamMessage.writeByte((byte)1);
      foreignStreamMessage.writeByte((byte)2);
      foreignStreamMessage.writeByte((byte)3);

      HornetQStreamMessage copy = new HornetQStreamMessage(foreignStreamMessage, session);

      MessageHeaderTestBase.ensureEquivalent(foreignStreamMessage, copy);
   }
View Full Code Here

   // Public --------------------------------------------------------

   public void testGetType() throws Exception
   {
      HornetQStreamMessage message = new HornetQStreamMessage();
      Assert.assertEquals(HornetQStreamMessage.TYPE, message.getType());
   }
View Full Code Here

   }

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

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

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

   }

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

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

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

   }

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

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

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

   }

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

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

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

   }

   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

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.