Package net.buffalo.protocal.converters.basic

Examples of net.buffalo.protocal.converters.basic.NullConverter


  Converter nullConverter;
 
  public DefaultConverterLookup() {
    converters = new ArrayList(12);
    converterCache = new HashMap();
    nullConverter = new NullConverter();
    tagNameConverterCache = new Hashtable(10);
   
    registerDefaultConverters();
  }
View Full Code Here


    Long d = (Long)id.unmarshal(TestUtils.createStreamReader("<long>710010098</long>"), null);
    assertEquals(new Long(710010098), d);
  }
 
  public void testCouldGetNull() throws Exception {
    NullConverter nd = new NullConverter();
    assertNull(nd.unmarshal(TestUtils.createStreamReader("<null></null>"), null));
    assertNull(nd.unmarshal(TestUtils.createStreamReader("<null></null>"), null));
  }
View Full Code Here

    assertTrue(serializer.canConvert(Long.class));
    assertFalse(serializer.canConvert(String.class));
  }
 
  public void testShouldOutputNull() {
    NullConverter serializer = new NullConverter();
    assertEquals("<null></null>", marshal(serializer, null));
    assertTrue(serializer.canConvert(null));
    assertFalse(serializer.canConvert(ArrayList.class));
  }
View Full Code Here

TOP

Related Classes of net.buffalo.protocal.converters.basic.NullConverter

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.