Package org.jboss.seam.remoting.wrapper

Examples of org.jboss.seam.remoting.wrapper.MapWrapper.marshal()


      {
      }

      // ensure when we marshal/unmarshal the values in the map remain the same     
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      wrapper.marshal(out);
     
      SAXReader xmlReader = new SAXReader();
      Document doc = xmlReader.read( new ByteArrayInputStream(out.toByteArray()) );    
     
      Element root = doc.getRootElement();     
View Full Code Here


      byte[] expected = ("<map><element><k><str>foo</str></k><v><str>aaaaa</str></v></element>"
            + "<element><k><str>bar</str></k><v><str>zzzzz</str></v></element></map>")
            .getBytes();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      wrapper.marshal(out);
      assertEquals(expected, out.toByteArray());

      // test conversionScore() method
      assert ConversionScore.exact == wrapper.conversionScore(Map.class);
      assert ConversionScore.exact == wrapper.conversionScore(HashMap.class);
View Full Code Here

      byte[] expected = ("<map><element><k><str>foo</str></k><v><str>aaaaa</str></v></element>"
            + "<element><k><str>bar</str></k><v><str>zzzzz</str></v></element></map>")
            .getBytes();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      wrapper.marshal(out);
      assertEquals(expected, out.toByteArray());

      // test conversionScore() method
      assert ConversionScore.exact == wrapper.conversionScore(Map.class);
      assert ConversionScore.exact == wrapper.conversionScore(HashMap.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.