Package com.mockobjects.servlet

Examples of com.mockobjects.servlet.MockServletConfig


  /**
   * Test that getResource loads based on the servlet config param -
   * <init-param>
   */
  public void testGetResource_initparam() {
    MockServletConfig config = getServletConfig();

    config.setInitParameter("paraX", "paraX-config");
    ((MockServletContext) config.getServletContext()).setInitParameter(
        "paraX", "paraX-context");
    try {
      assertEquals("paraX-config", ServletParamUtils.getParameterValue(
          "paraX", config));
    } catch (Exception e) {
View Full Code Here


  /**
   * Test that getResource loads based on the servlet context param -
   * <context-param>
   */
  public void testGetResource_contextparam() {
    MockServletConfig config = getServletConfig();

    // don't set the param in the servlet config
    ((MockServletContext) config.getServletContext()).setInitParameter(
        "paraX", "paraX-context");
    try {
      assertEquals("paraX-context", ServletParamUtils.getParameterValue(
          "paraX", config));
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.mockobjects.servlet.MockServletConfig

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.