Examples of VRaptorTestResult


Examples of br.com.caelum.vraptor.test.VRaptorTestResult

  }

  public VRaptorTestResult execute() {
    cdiContainer.startSession();
    try {
      VRaptorTestResult result = executeFlow(new LinkedList<UserRequest<VRaptorTestResult>>(flows), null, null);
      return result;
    } finally {
      cdiContainer.stopSession();
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.test.VRaptorTestResult

        if (session != null) {
          request.setSession(session);
        }
        MockHttpServletResponse response = new MockHttpServletResponse();
        MockFilterChain chain = new MockFilterChain();
        VRaptorTestResult vRaptorTestResult = null;
        Throwable applicationError = null;
        try {
          filter.doFilter(request, response, chain);
        //TODO: find a better alternative
        } catch (Exception e) {
          applicationError = e.getCause();
          response.setStatus(500);
        }
        Result vraptorResult = (Result) ((TargetInstanceProxy) result.get()).getTargetInstance();
        Validator vraptorValidator = (Validator) ((TargetInstanceProxy) validator.get()).getTargetInstance();
        vRaptorTestResult = new VRaptorTestResult(vraptorResult, response, request, vraptorValidator);
        vRaptorTestResult.setApplicationError(applicationError);
        return vRaptorTestResult;
      }

      @Override
      public void setCookies(List<Cookie> cookies) {
View Full Code Here

Examples of br.com.caelum.vraptor.test.VRaptorTestResult

  }

  public VRaptorTestResult execute() {
    cdiContainer.startSession();
    try {
      VRaptorTestResult result = executeFlow(new LinkedList<UserRequest<VRaptorTestResult>>(flows), null, null);
      return result;
    } finally {
      cdiContainer.stopSession();
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.test.VRaptorTestResult

        if (session != null) {
          request.setSession(session);
        }
        MockHttpServletResponse response = new MockHttpServletResponse();
        MockFilterChain chain = new MockFilterChain();
        VRaptorTestResult vRaptorTestResult = null;
        Throwable applicationError = null;
        try {
          filter.doFilter(request, response, chain);
        //TODO: find a better alternative
        } catch (Exception e) {
          applicationError = e.getCause();
          response.setStatus(500);
        }
        Result vraptorResult = (Result) ((TargetInstanceProxy) result.get()).getTargetInstance();
        Validator vraptorValidator = (Validator) ((TargetInstanceProxy) validator.get()).getTargetInstance();
        vRaptorTestResult = new VRaptorTestResult(vraptorResult, response, request, vraptorValidator);
        vRaptorTestResult.setApplicationError(applicationError);
        return vRaptorTestResult;
      }

      @Override
      public void setCookies(List<Cookie> cookies) {
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.