Package net.buffalo.protocal.converters.basic

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


  }

  protected void registerDefaultConverters() {
    BooleanConverter booleanConverter = new BooleanConverter();
    DoubleConverter doubleConverter = new DoubleConverter();
    IntegerConverter integerConverter = new IntegerConverter();
    LongConverter longConverter = new LongConverter();
    StringConverter stringConverter = new StringConverter();
    DateConverter dateConverter = new DateConverter();
    CollectionConverter collectionConverter = new CollectionConverter();
    MapConverter mapConverter = new MapConverter();
View Full Code Here


    Double d = (Double)nd.unmarshal(TestUtils.createStreamReader("<double>1.1</double>"), null);
    assertEquals(new Double(1.1d), d);
  }
 
  public void testCouldGetInt() throws Exception {
    IntegerConverter id = new IntegerConverter();
    Integer d = (Integer)id.unmarshal(TestUtils.createStreamReader("<int>1001</int>"), null);
    assertEquals(new Integer(1001), d);
 
  }
View Full Code Here

    String toString = stringWriter.getBuffer().toString();
    return toString;
  }
 
  public void testShouldOutputInt() {
    IntegerConverter serializer = new IntegerConverter();
    assertEquals("<int>123</int>", marshal(new IntegerConverter(), new Integer(123)));
    assertEquals("<int>234</int>", marshal(new IntegerConverter(), new Integer(234)));
    assertTrue(serializer.canConvert(Integer.class));
    assertFalse(serializer.canConvert(Long.class));
  }
View Full Code Here

    assertTrue(serializer.canConvert(Integer.class));
    assertFalse(serializer.canConvert(Long.class));
  }
 
  public void testShouldOutputShortAndByteToInt() {
    IntegerConverter serializer = new IntegerConverter();
    assertTrue(serializer.canConvert(Short.class));
    assertTrue(serializer.canConvert(Byte.class));
  }
View Full Code Here

TOP

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

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.