Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQMapMessage


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

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

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


   public void testGetFloatFromFloat() throws Exception
   {
      float value = RandomUtil.randomFloat();

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

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

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

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

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

   public void testGetFloatFromString() throws Exception
   {
      float value = RandomUtil.randomFloat();

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

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

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

   public void testGetFloatFromInvalidType() throws Exception
   {
      HornetQMapMessage message = new HornetQMapMessage();
      message.setChar(itemName, RandomUtil.randomChar());

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

   public void testGetDoubleFromFloat() throws Exception
   {
      float value = RandomUtil.randomFloat();

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

      Assert.assertEquals(Float.valueOf(value).doubleValue(), message.getDouble(itemName));
   }
View Full Code Here

   public void testGetDoubleFromDouble() throws Exception
   {
      double value = RandomUtil.randomDouble();

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

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

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

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

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

   public void testGetDoubleFromString() throws Exception
   {
      double value = RandomUtil.randomDouble();

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

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

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

   public void testGetDoubleFromInvalidType() throws Exception
   {
      HornetQMapMessage message = new HornetQMapMessage();
      message.setChar(itemName, RandomUtil.randomChar());

      try
      {
         message.getDouble(itemName);
         Assert.fail("MessageFormatException");
      }
      catch (MessageFormatException e)
      {
      }
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.