Package org.strecks.util.impl

Examples of org.strecks.util.impl.ClassWithNoArgMethod


  }

  @Test
  public void testInvokeMethod2() throws Exception
  {
    ClassWithNoArgMethod instance = new ClassWithNoArgMethod();
    Object invokeVoidMethod = ReflectHelper.invokeMethod(instance, "method");
    Assert.assertEquals(invokeVoidMethod, "hello");
  }
View Full Code Here


  }

  @Test
  public void testInvokeMethodWithNullArg() throws Exception
  {
    ClassWithNoArgMethod instance = new ClassWithNoArgMethod();
    Object invokeVoidMethod = ReflectHelper.invokeMethod(instance, "method", null);
    Assert.assertEquals(invokeVoidMethod, "hello");
  }
View Full Code Here

  }

  @Test
  public void testInvokeMethodWithClassCheck() throws Exception
  {
    ClassWithNoArgMethod instance = new ClassWithNoArgMethod();
    String invokeVoidMethod = ReflectHelper.invokeMethod(instance, "method", String.class);
    Assert.assertEquals(invokeVoidMethod, "hello");
  }
View Full Code Here

  @Test
  public void testInvokeMethodWithFailedClassCheck() throws Exception
  {
    try
    {
      ClassWithNoArgMethod instance = new ClassWithNoArgMethod();
      Object invokeVoidMethod = ReflectHelper.invokeMethod(instance, "method", Integer.class);
      Assert.assertEquals(invokeVoidMethod, "hello");
    }
    catch (ApplicationRuntimeException e)
    {
View Full Code Here

  @Test
  public void testInvokeNonexistentMethod() throws Exception
  {
    try
    {
      ClassWithNoArgMethod instance = new ClassWithNoArgMethod();
      Object invokeVoidMethod = ReflectHelper.invokeMethod(instance, "nonexistent", String.class);
      Assert.assertEquals(invokeVoidMethod, "hello");
    }
    catch (ApplicationRuntimeException e)
    {
View Full Code Here

TOP

Related Classes of org.strecks.util.impl.ClassWithNoArgMethod

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.