Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQStreamMessage


      });
   }

   public void testWriteObjectWithNull() throws Exception
   {
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeObject(null);
   }
View Full Code Here


      message.writeObject(null);
   }

   public void testWriteObjectWithInvalidType() throws Exception
   {
      HornetQStreamMessage message = new HornetQStreamMessage();

      try
      {
         message.writeObject(new ArrayList());
         Assert.fail("MessageFormatException");
      }
      catch (MessageFormatException e)
      {
      }
View Full Code Here

   }

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

      message.reset();

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

   }

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

      message.reset();

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

   }

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

      message.reset();

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

   }

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

      message.reset();

      byte[] v = (byte[])message.readObject();
      UnitTestCase.assertEqualsByteArrays(value, v);
   }
View Full Code Here

   }

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

      message.reset();

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

   }

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

      message.reset();

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

   }

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

      message.reset();

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

   }

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

      message.reset();

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