Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQMapMessage


      Assert.assertEquals(value, message.getByte(itemName));
   }

   public void testGetByteFromNull() throws Exception
   {
      HornetQMapMessage message = new HornetQMapMessage();

      try
      {
         message.getByte(itemName);
         Assert.fail("NumberFormatException");
      }
      catch (NumberFormatException e)
      {
      }
View Full Code Here


   public void testGetByteFromString() throws Exception
   {
      byte value = RandomUtil.randomByte();

      HornetQMapMessage message = new HornetQMapMessage();
      message.setString(itemName, Byte.toString(value));

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

      Assert.assertEquals(value, message.getByte(itemName));
   }

   public void testGetByteFromInvalidType() throws Exception
   {
      HornetQMapMessage message = new HornetQMapMessage();
      message.setFloat(itemName, RandomUtil.randomFloat());

      try
      {
         message.getByte(itemName);
         Assert.fail("MessageFormatException");
      }
      catch (MessageFormatException e)
      {
      }
View Full Code Here

   public void testGetShortFromByte() throws Exception
   {
      byte value = RandomUtil.randomByte();

      HornetQMapMessage message = new HornetQMapMessage();
      message.setByte(itemName, value);

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

   public void testGetShortFromShort() throws Exception
   {
      short value = RandomUtil.randomShort();

      HornetQMapMessage message = new HornetQMapMessage();
      message.setShort(itemName, value);

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

      Assert.assertEquals(value, message.getShort(itemName));
   }

   public void testGetShortFromNull() throws Exception
   {
      HornetQMapMessage message = new HornetQMapMessage();

      try
      {
         message.getShort(itemName);
         Assert.fail("NumberFormatException");
      }
      catch (NumberFormatException e)
      {
      }
View Full Code Here

   public void testGetShortFromString() throws Exception
   {
      short value = RandomUtil.randomShort();

      HornetQMapMessage message = new HornetQMapMessage();
      message.setString(itemName, Short.toString(value));

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

      Assert.assertEquals(value, message.getShort(itemName));
   }

   public void testGetShortFromInvalidType() throws Exception
   {
      HornetQMapMessage message = new HornetQMapMessage();
      message.setFloat(itemName, RandomUtil.randomFloat());

      try
      {
         message.getShort(itemName);
         Assert.fail("MessageFormatException");
      }
      catch (MessageFormatException e)
      {
      }
View Full Code Here

   public void testGetIntFromByte() throws Exception
   {
      byte value = RandomUtil.randomByte();

      HornetQMapMessage message = new HornetQMapMessage();
      message.setByte(itemName, value);

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

   public void testGetIntFromShort() throws Exception
   {
      short value = RandomUtil.randomShort();

      HornetQMapMessage message = new HornetQMapMessage();
      message.setShort(itemName, value);

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

TOP

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

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.