Package org.springsource.loaded.test.infra

Examples of org.springsource.loaded.test.infra.Result


  }

  @Override
  public Result test() throws ResultException, Exception {
    try {
      Result r = runOnInstance(callerClazz, callerInstance, targetMethodName, targetClass);
      return r;
    } catch (ResultException e) {
      throw new Error(e);
    }
  }
View Full Code Here


    }

    //Check that tests are generated/executed in the order they are presumed to:
    checkTestHistory();

    return new Result(targetTypeName, "", "");
  }
View Full Code Here

      assertNoSuchMethodException(TARGET_CLASS_NAME + ".lateMethod()", e);
    }

    reloadType("002");

    Result r = getDeclaredMethod("lateMethod");
    assertMethod("public int " + TARGET_CLASS_NAME + ".lateMethod()", r);
  }
View Full Code Here

  /**
   * Testing Class.getDeclaredMethod() - the method exists from the start and stays
   */
  @Test
  public void test_getDeclaredMethodStays() throws Exception {
    Result r = getDeclaredMethod("methodStays");
    assertMethod("public int " + TARGET_CLASS_NAME + ".methodStays()", r);

    reloadType("002");

    r = getDeclaredMethod("methodStays");
View Full Code Here

  @Test
  public void test_getDeclaredConstructor() throws Exception {

    // Let's call the constructor, nothing reloaded
    Result r = getDeclaredConstructor();
    assertNotNull(r.returnValue);
    Constructor<?> ctor = (Constructor<?>) r.returnValue;
    r = invokeConstructor(ctor);
    assertNotNull(r.returnValue);
View Full Code Here

  @Test
  public void test_getDeclaredConstructors() throws Exception {

    // Let's call the constructor, nothing reloaded
    Result r = getDeclaredConstructors();
    assertNotNull(r.returnValue);
    Constructor<?>[] ctors = (Constructor<?>[]) r.returnValue;
    assertEquals(2, ctors.length);
    for (Constructor<?> ctor : ctors) {
      if (ctor.getParameterTypes().length == 1 && ctor.getParameterTypes()[0] == Integer.TYPE) {
View Full Code Here

   * Testing Class.getDeclaredMethod() - the method exists from the start, but its implementation changed (really this test is not
   * different from test_getDeclaredMethodStays unless we do something special when method isn't changed...)
   */
  @Test
  public void test_getDeclaredMethodChanged() throws Exception {
    Result r = getDeclaredMethod("methodChanged");
    assertMethod("public int " + TARGET_CLASS_NAME + ".methodChanged()", r);

    reloadType("002");

    r = getDeclaredMethod("methodChanged");
View Full Code Here

  /**
   * Testing Class.getDeclaredMethod() - first the method exists - then it is deleted
   */
  @Test
  public void test_getDeclaredMethodDeleted() throws Exception {
    Result r = getDeclaredMethod("methodDeleted");
    assertMethod("public int " + TARGET_CLASS_NAME + ".methodDeleted()", r);

    reloadType("002");

    //    assertMethod("***DELETED:public int "+TARGET_CLASS_NAME+".methodDeleted()", r);
View Full Code Here

      assertNoSuchMethodException(TARGET_CLASS_NAME + ".custard(java.lang.String, [I, int)", e);
    }

    reloadType("002");

    Result r = getDeclaredMethod("doubleIt", String.class);
    assertMethod("public java.lang.String " + TARGET_CLASS_NAME + ".doubleIt(java.lang.String)", r);
  }
View Full Code Here

  /**
   * Test to see if Method objects for 'protected' methods are correct (w.r.t. to modifier flags)
   */
  @Test
  public void test_getDeclaredProtectedMethod() throws Exception {
    Result r = getDeclaredMethod("protectedMethod");
    assertMethod("protected java.lang.String " + TARGET_CLASS_NAME + ".protectedMethod()", r);

    reloadType("002");

    r = getDeclaredMethod("protectedMethod");
View Full Code Here

TOP

Related Classes of org.springsource.loaded.test.infra.Result

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.