Package net.buffalo.protocal.converters.basic

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


 
  public void testShouldOutputBoolean() throws Exception {
    Converter serializer = new BooleanConverter();
    assertEquals("<boolean>1</boolean>", marshal(serializer, Boolean.TRUE));
    assertEquals("<boolean>0</boolean>", marshal(serializer, Boolean.FALSE));
    assertTrue(serializer.canConvert(Boolean.class));
    assertFalse(serializer.canConvert(Long.class));
  }
 
  public void testMethodInvokation() throws Exception {
    Calculator c = new Calculator();
View Full Code Here


  public void testShouldOutputBoolean() throws Exception {
    Converter serializer = new BooleanConverter();
    assertEquals("<boolean>1</boolean>", marshal(serializer, Boolean.TRUE));
    assertEquals("<boolean>0</boolean>", marshal(serializer, Boolean.FALSE));
    assertTrue(serializer.canConvert(Boolean.class));
    assertFalse(serializer.canConvert(Long.class));
  }
 
  public void testMethodInvokation() throws Exception {
    Calculator c = new Calculator();
    Method method = c.getClass().getMethod("sum", new Class[]{double.class, double.class});
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.