Package net.buffalo.protocal.converters.map

Examples of net.buffalo.protocal.converters.map.MapConverter


    IntegerConverter integerConverter = new IntegerConverter();
    LongConverter longConverter = new LongConverter();
    StringConverter stringConverter = new StringConverter();
    DateConverter dateConverter = new DateConverter();
    CollectionConverter collectionConverter = new CollectionConverter();
    MapConverter mapConverter = new MapConverter();
    ArrayConverter arrayConverter = new ArrayConverter();
    SqlDateConverter sqlDateConverter = new SqlDateConverter();
    BigNumberConverter bigNumberConverter = new BigNumberConverter();
    ExceptionConverter exceptionConverter = new ExceptionConverter();
    ObjectConverter objectConverter = new ObjectConverter();
View Full Code Here


  private FastStreamWriter streamWriter;
  private DefaultConverterLookup converterLookup;

  protected void setUp() throws Exception {
    super.setUp();
    converter = new MapConverter();
    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    converterLookup = new DefaultConverterLookup();
    mashallingContext = new DefaultMarshallingContext(converterLookup, streamWriter);
  }
View Full Code Here

    converterLookup = new DefaultConverterLookup();
    mashallingContext = new DefaultMarshallingContext(converterLookup, streamWriter);
  }
 
  public void testShouldSerializeMap() throws Exception {
    MapConverter ms = new MapConverter();
    assertTrue(ms.canConvert(HashMap.class));
    assertFalse(ms.canConvert(null));
   
    Map m = new HashMap();
    m.put("string", "value");
    ms.marshal(m, mashallingContext, streamWriter);
    assertEquals("<map>" +
        "<type>java.util.HashMap</type>" +
        "<string>string</string>" +
        "<string>value</string>" +
        "</map>", stringWriter.getBuffer().toString());
View Full Code Here

TOP

Related Classes of net.buffalo.protocal.converters.map.MapConverter

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.