Package br.com.caelum.vraptor.test

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


        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

  }

  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

        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

Related Classes of br.com.caelum.vraptor.test.VRaptorTestResult

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.