Examples of GetMethodWebRequest


Examples of com.meterware.httpunit.GetMethodWebRequest

        checkTextRegex(resp,"values","^\\[.*\\]$");
    }

    public @Test void testCookiesTool() throws Exception {
        WebConversation conv = new WebConversation();
        WebRequest req = new GetMethodWebRequest(ROOT_URL+"cookies.vm");
        WebResponse resp = conv.getResponse(req);

        /* check all */
        checkTextStart(resp,"all","[Ljavax.servlet.http.Cookie;");

View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

        checkTextStart(resp,"get","javax.servlet.http.Cookie");
    }

    public @Test void testLinkTool() throws Exception {
        WebConversation conv = new WebConversation();
        WebRequest req = new GetMethodWebRequest(ROOT_URL+"link.vm");
        WebResponse resp = conv.getResponse(req);

        /* check anchor(foo) and anchor */
        resp = submitWithParam(resp,"anchor","anchor","foo");
        checkText(resp,"anchor","#foo");
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

        checkText(resp,"encodeURL","%3A+%2F");
    }

    public @Test void testParameterParserTool() throws Exception {
        WebConversation conv = new WebConversation();
        WebRequest req = new GetMethodWebRequest(ROOT_URL+"params.vm?foo=bar&b=false&n=55&d=1.2");
        WebResponse resp = conv.getResponse(req);

        /* check exists(foo) */
        resp = submitWithParam(resp,"exists","exists","foo");
        checkText(resp,"exists","true");
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

    public JwsTest(String name) {
        super(name);
    }

    public void testStockQuote() throws Exception {
        WebRequest request = new GetMethodWebRequest(url+"/StockQuoteService.jws?wsdl");
        assertStringInBody(request,"<wsdl:definitions");
    }
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

    /**
     * verify the /servlet url is there
     * @throws Exception
     */
    public void testServlet() throws Exception {
        WebRequest request = new GetMethodWebRequest(url+"/servlet/AxisServlet");
        assertStringInBody(request,services_text);
    }
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

    /**
     * verify the services url works
     */
    public void testServices() throws Exception {
        WebRequest request = new GetMethodWebRequest(services);
        expectErrorCode(request,404);
    }
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

     * @todo decide on the exception to throw in the servlet, write the
     * test then fix the servlet
     * @throws Exception
     */
    public void testInvalidServiceRaisesError() throws Exception {
        WebRequest request = new GetMethodWebRequest(invalid_service);
        expectErrorCode(request,404);
    }
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

     * A missing wsdl page should be a 404 error; though it is
     * returning 500 as of 2002-08-13
     * @throws Exception
     */
    public void testInvalidServiceWsdlRaisesError() throws Exception {
        WebRequest request = new GetMethodWebRequest(invalid_service+"?wsdl");
        // "The AXIS engine could not find a target service to invoke!");
        expectErrorCode(request,404);

    }
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

    /**
     * test version call
     * @throws Exception
     */
    public void testVersion() throws Exception {
        WebRequest request = new GetMethodWebRequest(services+"/Version?wsdl");
        assertStringInBody(request,"<wsdl:definitions");
    }
View Full Code Here

Examples of com.meterware.httpunit.GetMethodWebRequest

      setProxyServer(proxy.getExtracted("host"), MCast.toint(proxy.getExtracted("port", "8080"),8080), proxy.getExtracted("user"), proxy.getExtracted("password"));
    }
  }

  public WebResponse request(CaoElement element, String suffix) throws IOException, SAXException {
     WebRequest req = new GetMethodWebRequest( app.getUri(element) + suffix );
     return getResponse( req );
  }
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.