The following unit test works fine for me. You need to track down the source of 
the invalid org.jboss.util.Primitives class in your classpath.


  |    public void testMapMessage() throws Exception
  |    {
  |       log.info("+++ testMapMessage");
  |       MapMessage sent = session.createMapMessage();
  |       sent.setBoolean("Boolean", true);
  |       sent.setByte("Byte", (byte) 1);
  |       sent.setBytes("Bytes", "Bytes".getBytes());
  |       sent.setChar("Char", 'c');
  |       sent.setShort("Short", (short) 31415);
  |       sent.setInt("Int", 314159);
  |       sent.setLong("Long", 3141592653589793238L);
  |       sent.setDouble("Double", 3.1415926535897932384626433832795);
  |       sent.setFloat("Float", 3.141f);
  |       sent.setObject("Object", "31415926535897932384626433832795");
  |       sent.setString("String", "31415926535897932384626433832795");
  | 
  |       MapMessage recv = (MapMessage) sendRecMsg(sent);
  |       log.debug("recv: "+recv);
  |       assertTrue("Boolean == true", recv.getBoolean("Boolean") == true);
  |       assertTrue("Byte == 1", recv.getByte("Byte") == 1);
  |       assertTrue("Bytes == Bytes[]",
  |          Arrays.equals(recv.getBytes("Bytes"), "Bytes".getBytes()));
  |       assertTrue("Char == c", recv.getChar("Char") == 'c');
  |       assertTrue("Short == 314159", recv.getShort("Short") == 31415);
  |       assertTrue("Int == 314159", recv.getInt("Int") == 314159);
  |       assertTrue("Long == 3141592653589793238L",
  |          recv.getLong("Long") == 3141592653589793238L);
  |       assertTrue("Double == 3.1415926535897932384626433832795",
  |          recv.getDouble("Double") == 3.1415926535897932384626433832795);
  |       assertTrue("Float == true", recv.getFloat("Float") == 3.141f);
  |       assertTrue("Object == 31415926535897932384626433832795",
  |          
recv.getObject("Object").equals("31415926535897932384626433832795"));
  |       assertTrue("String == 31415926535897932384626433832795",
  |          
recv.getString("String").equals("31415926535897932384626433832795"));
  |    }
  | 


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880820#3880820

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880820


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to