Package org.springsource.loaded.test.infra

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


  public void superdispatchers() throws Exception {
    String sub = "subpkg.Controller";
   
    ReloadableType subR = subLoader.loadAsReloadableType(sub);
   
    Result result = runOnInstance(subR.getClazz(), subR.getClazz().newInstance(), "foo");
    assertEquals("grails.Top.foo() running\nsubpkg.ControllerB.foo() running",result.stdout);

    // Reload the subtype
    subR.loadNewVersion("2",retrieveRename(sub,sub+"002"));
   
View Full Code Here


      if (capture) {
        System.setOut(oldo);
        System.setErr(olde);
      }
    }
    return new Result(result, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
  }
View Full Code Here

      if (capture) {
        System.setOut(oldo);
        System.setErr(olde);
      }
    }
    return new Result(result, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
  }
View Full Code Here

      if (capture) {
        System.setOut(oldo);
        System.setErr(olde);
      }
    }
    return new Result(result, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
  }
View Full Code Here

      if (capture) {
        System.setOut(oldo);
        System.setErr(olde);
      }
    }
    return new Result(result, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
  }
View Full Code Here

      System.out.println(ose.toString());
    }
    if (exception != null) {
      throw new ResultException(exception, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
    } else {
      return new Result(result, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
    }
  }
View Full Code Here

    String fieldToAccess = scope + "Field";
    String expectMsg = "Class " + INVOKER_CLASS_NAME + " " + "can not access a member of class " + targetClass.dottedtypename
        + " " + "with modifiers \"" + (scope.equals("default") ? "" : scope) + "\"";

    //First... we do set the Access flag, it should work!
    Result r = runOnInstance(callerClazz, callerInstance, "getFieldWithAccess", targetClass.getClazz(), fieldToAccess, true);
    Assert.assertEquals(r.returnValue, fieldToAccess + " value");

    //Then... we do not set the Access flag, it should fail!
    try {
      r = runOnInstance(callerClazz, callerInstance, "getFieldWithAccess", targetClass.getClazz(), fieldToAccess, false);
View Full Code Here

    Assert.assertEquals("myDeletedField", f.getName());

    // First try to access the field before reloading
    callerClazz = nonReloadableClass(INVOKER_CLASS_NAME);
    callerInstance = newInstance(callerClazz);
    Result r = runOnInstance(callerClazz, callerInstance, "callGet", f, targetInstance);
    Assert.assertEquals(100, r.returnValue);

    // Now reload the class... field is deleted
    reloadType(targetClass, "002");
View Full Code Here

    callerInstance = newInstance(callerClazz);
  }

  @Override
  public Result test() throws ResultException, Exception {
    Result r = runOnInstance(callerClazz, callerInstance, targetMethodName, targetClass, targetFieldName);
    return r;
  }
View Full Code Here

    callerInstance = newInstance(callerClazz);
  }

  @Override
  public Result test() throws ResultException, Exception {
    Result r = runOnInstance(callerClazz, callerInstance, testedMethodCaller, targetClass, annotClass);
    return r;
  }
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.