Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQStreamMessage


   }

   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

      Assert.assertEquals(value, message.readChar());
   }
  
   public void testReadCharFromNull() throws Exception
   {
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeString(null);
      message.reset();

      try
      {
         message.readChar();
         fail();
      }
      catch (NullPointerException e)
      {
      }
View Full Code Here

   }

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

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

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