Package org.richfaces.test

Examples of org.richfaces.test.TestException


        if (null == classLoader) {
          classLoader = this.getClass().getClassLoader();
        }       
        url = classLoader.getResource(classpath);
        if(null == url){
          throw new TestException("Virtual server resource can't be loaded from "+classpath);
        }
      }
    }

    return url;
View Full Code Here


        } else {
          addRequestParameter(URLDecoder.decode(par, request
              .getCharacterEncoding()), null);
        }
      } catch (UnsupportedEncodingException e) {
        throw new TestException(e);
      }
    }
  }
View Full Code Here

   * Execute this connection request on the associated servlet or filter chain.
   * @throws TestException if any errors were during execution.
   */
  public void execute() {
    if (isStarted() || isFinished()) {
      throw new TestException(
          "request have already been executed");
    }
    start();
    try {
      this.servlet.execute(request, response);
    } catch (ServletException e) {
      throw new TestException("Error execute request ",e);
    } catch (IOException e) {
      throw new TestException("IO Error during request execution",e);
    } finally {
      finish();
    }
  }
View Full Code Here

        String encoding = response.getCharacterEncoding();
        if (null != encoding) {
          try {
            content = new String(streamContent, encoding);
          } catch (UnsupportedEncodingException e) {
            throw new TestException(e);
          }
        } else {
          content = new String(streamContent);
        }
      }
View Full Code Here

      elFactoryClass = DEFAULT_EXPRESSION_FACTORY;
    }
    try {
      expressionFactory = Class.forName(elFactoryClass).asSubclass(ExpressionFactory.class).newInstance();
    } catch (Exception e) {
      throw new TestException("Couldn't instantiate EL expression factory",e);
    }
  }
View Full Code Here

    if ("jar".equals(protocol)) {
      addResourcesFromJar(resource, baseDirectory);
    } else if ("file".equals(protocol)) {
      addResourcesFromFile(resource, baseDirectory);
    } else {
      throw new TestException("Unsupported protocol " + protocol);
    }
  }
View Full Code Here

    }
    if (!directory.isDirectory()) {
      directory = directory.getParentFile();
    }
    if(!directory.exists()){
      throw new TestException("directory does not exist:"+directory.getAbsolutePath());
    }
    try {
      addFiles(baseDirectory, directory);
    } catch (MalformedURLException e) {
      throw new TestException(e);
    }
  }
View Full Code Here

      file = file.getParentFile();
    }
    try {
      addFiles(baseDirectory, file);
    } catch (MalformedURLException e) {
      throw new TestException(e);
    }
  }
View Full Code Here

              relativeResource));
        }
      }

    } catch (IOException e) {
      throw new TestException("Error read Jar content", e);
    } catch (URISyntaxException e) {
      throw new TestException(e);
    }
  }
View Full Code Here

   *         and the server has no session
   *
   */
  public synchronized HttpSession getSession(boolean create) {
    if (!initialised) {
      throw new TestException("Staging server have not been initialised");
    }
    HttpSession httpSession = this.getCurrentSession();
    if (null == httpSession && create) {
      ServerHttpSession sessionImpl = new ServerHttpSession();
      // Create proxy objects.
View Full Code Here

TOP

Related Classes of org.richfaces.test.TestException

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.