Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQMapMessage


      ClientSession session = new FakeSession(clientMessage);
      MapMessage foreignMapMessage = new SimpleJMSMapMessage();
      foreignMapMessage.setInt("int", 1);
      foreignMapMessage.setString("string", "test");

      HornetQMapMessage copy = new HornetQMapMessage(foreignMapMessage, session);

      MessageHeaderTestBase.ensureEquivalent(foreignMapMessage, copy);
   }
View Full Code Here


      ClientSession session = new FakeSession(clientMessage);
      MapMessage foreignMapMessage = new SimpleJMSMapMessage();
      foreignMapMessage.setInt("int", 1);
      foreignMapMessage.setString("string", "test");

      HornetQMapMessage copy = new HornetQMapMessage(foreignMapMessage, session);

      MessageHeaderTestBase.ensureEquivalent(foreignMapMessage, copy);
   }
View Full Code Here

      ClientSession session = new FakeSession(clientMessage);
      MapMessage foreignMapMessage = new SimpleJMSMapMessage();
      foreignMapMessage.setInt("int", 1);
      foreignMapMessage.setString("string", "test");

      HornetQMapMessage copy = new HornetQMapMessage(foreignMapMessage, session);

      MessageHeaderTestBase.ensureEquivalent(foreignMapMessage, copy);
   }
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

   public void testGetStringFromBoolean() throws Exception
   {
      boolean value = RandomUtil.randomBoolean();

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

      Assert.assertEquals(Boolean.toString(value), message.getString(itemName));
   }
View Full Code Here

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

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

      Assert.assertEquals(Byte.toString(value), message.getString(itemName));
   }
View Full Code Here

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

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

      Assert.assertEquals(Character.toString(value), message.getString(itemName));
   }
View Full Code Here

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

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

      Assert.assertEquals(Short.toString(value), message.getString(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.