Package net.buffalo.protocal.converters.basic

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


    return result;
  }

  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();
View Full Code Here


    assertEquals(1, cal.get(Calendar.MINUTE));
    assertEquals(27, cal.get(Calendar.SECOND));
  }
 
  public void testChouldGetDouble() throws Exception {
    DoubleConverter nd = new DoubleConverter();
    Double d = (Double)nd.unmarshal(TestUtils.createStreamReader("<double>1.1</double>"), null);
    assertEquals(new Double(1.1d), d);
  }
View Full Code Here

 
  public void testMethodInvokation() throws Exception {
    Calculator c = new Calculator();
    Method method = c.getClass().getMethod("sum", new Class[]{double.class, double.class});
    Object result = method.invoke(c, new Object[]{new Double(1.0), new Double(2.0)});
    assertEquals("<double>3.0</double>", marshal(new DoubleConverter(),result));
   
    Method method1 = c.getClass().getMethod("test", new Class[]{});
    Object result1 = method1.invoke(c, new Object[]{});
    assertTrue(result1.getClass().isArray());
   
View Full Code Here

    assertTrue(result1.getClass().isArray());
   
  }
 
  public void testDoubleSerializerCanOutputFloatAndDouble() throws Exception {
    DoubleConverter ds = new DoubleConverter();
    assertTrue(ds.canConvert(Double.class));
    assertTrue(ds.canConvert(Float.class));
  }
View Full Code Here

TOP

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

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.