Examples of ServletConfiguration


Examples of org.apache.cactus.configuration.ServletConfiguration

     * Verify that <code>getParameterPost</code> returns null if no parameter
     * of a given name was added to the request.
     */
    public void testGetParameterPostNull()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addParameter("param1", "value1", WebRequest.GET_METHOD);

        String result = request.getParameterPost("param1");

View Full Code Here

Examples of org.apache.cactus.configuration.ServletConfiguration

     * Verify that <code>getHeader</code> returns the first header
     * that was added to the request.
     */
    public void testGetHeaderOk()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addHeader("header1", "value1");
        request.addHeader("header2", "value2");

        String result = request.getHeader("header1");
View Full Code Here

Examples of org.apache.cactus.configuration.ServletConfiguration

     * Verify that <code>getHeader</code> returns null if no header
     * of a given name was added to the request.
     */
    public void testGetHeaderNull()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        String result = request.getHeader("header1");

        assertNull(result);
    }
View Full Code Here

Examples of org.apache.cactus.configuration.ServletConfiguration

     * Verify that <Code>toString()</code> returns a nice string representation
     * of the <code>WebRequest</code>.
     */
    public void testToString()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addHeader("header1", "value1");
        request.addHeader("header1", "value2");
        request.addParameter("param1", "value1", WebRequest.GET_METHOD);
        request.addParameter("param1", "value1", WebRequest.POST_METHOD);
View Full Code Here

Examples of org.apache.cactus.configuration.ServletConfiguration

     * Verify that an error in the query string of <code>setURL()</code>
     * raises an exception.
     */
    public void testSetURLBadQueryString()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        try
        {
            request.setURL("jakarta.apache.org:80", "/catalog", "/garden",
                "/implements/", "badquerystring");
View Full Code Here

Examples of org.apache.cactus.configuration.ServletConfiguration

    /**
     * Verify that we can retrieve several POST parameters.
     */
    public void testGetPostParametersSeveral()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addParameter("param1", "value1", WebRequest.POST_METHOD);
        request.addParameter("param2", "value2", WebRequest.POST_METHOD);
        request.addParameter("param3", "value3", WebRequest.POST_METHOD);

View Full Code Here

Examples of org.apache.cactus.configuration.ServletConfiguration

     * @param theTest a pure JUnit Test that Cactus will wrap
     */
    void init(Test theTest)
    {
        setClientDelegate(new WebClientTestCaseDelegate(
            this, theTest, new ServletConfiguration()));       
        setServerDelegate(new ServerTestCaseDelegate(this, theTest));
    }
View Full Code Here

Examples of org.apache.cactus.configuration.ServletConfiguration

        // in its classpath (using the same mechanism as the Ant project is
        // using to conditionally compile tasks).

        // Create configuration objects
        BaseConfiguration baseConfig = new BaseConfiguration();
        ServletConfiguration servletConfig = new ServletConfiguration();
        FilterConfiguration filterConfig = new FilterConfiguration();

        // Create a Jetty Server object and configure a listener
        this.server = createServer(baseConfig);
View Full Code Here

Examples of org.apache.cactus.internal.configuration.ServletConfiguration

        // in its classpath (using the same mechanism as the Ant project is
        // using to conditionally compile tasks).

        // Create configuration objects
        BaseConfiguration baseConfig = new BaseConfiguration();
        ServletConfiguration servletConfig = new ServletConfiguration();
        FilterConfiguration filterConfig = new FilterConfiguration();

        // Create a Jetty Server object and configure a listener
        this.server = createServer(baseConfig);
View Full Code Here

Examples of org.apache.cactus.internal.configuration.ServletConfiguration

     * @see AbstractTestCase#runTest()
     */
    protected void runTest() throws Throwable
    {
        ClientTestCaseCaller delegator = new ClientTestCaseCaller(
            this, this, new HttpProtocolHandler(new ServletConfiguration()));

        try
        {
            // Call the begin method
            WebRequest request = new WebRequestImpl(new ServletConfiguration());

            delegator.callBeginMethod(request);

            // Create a mock HttpURLConnection as it is needed by HttpUnit
            // for creating a WebResponse
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.