Package net.buffalo.protocal.converters.basic

Examples of net.buffalo.protocal.converters.basic.LongConverter.canConvert()


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


  public void testShouldOutputLong() {
    LongConverter serializer = new LongConverter();
    assertEquals("<long>123</long>", marshal(serializer, new Long(123)));
    assertEquals("<long>234</long>", marshal(serializer, new Long(234)));
    assertTrue(serializer.canConvert(Long.class));
    assertFalse(serializer.canConvert(String.class));
  }
 
  public void testShouldOutputNull() {
    NullConverter serializer = new NullConverter();
    assertEquals("<null></null>", marshal(serializer, null));
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.