Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQMapMessage


   public void testGetIntFromInt() throws Exception
   {
      int value = RandomUtil.randomInt();

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

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


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

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

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

   public void testGetIntFromString() throws Exception
   {
      int value = RandomUtil.randomInt();

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

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

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

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

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

   public void testGetCharFromChar() throws Exception
   {
      char value = RandomUtil.randomChar();

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

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

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

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

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

      }
   }

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

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

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

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

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

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

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

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

   public void testGetLongFromInt() throws Exception
   {
      int value = RandomUtil.randomInt();

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

      Assert.assertEquals(value, message.getLong(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.