Package net.buffalo.protocal.acceptance

Examples of net.buffalo.protocal.acceptance.Calculator


   
  }
 
  public void testCanInvokeNumberInsteadOfConcreteNumber() throws Exception {
    Method method = Calculator.class.getMethod("longSum", new Class[]{Long.class, Long.class});
    Object result = ClassUtil.invokeMethod(new Calculator(), method, new Object[]{new Integer(1), new Integer(2)});
    assertEquals(new Long(3), result);
  }
View Full Code Here


    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});
    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

TOP

Related Classes of net.buffalo.protocal.acceptance.Calculator

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.