Package com.volantis.xml.pipeline.sax.drivers.web

Examples of com.volantis.xml.pipeline.sax.drivers.web.WebRequestParameter


            entity.setValue("test");
            checkEquality(entity);
        }
        {
            // test WebRequestParameter
            RequestParameterImpl entity = new WebRequestParameter();
            entity.setName("TEST");
            entity.setValue("test");
            checkEquality(entity);
        }

    }
View Full Code Here


        // =====================================================================
        //   Set Expectations
        // =====================================================================

        WebRequestParameter parameter = new WebRequestParameter();
        entityFactoryMock.expects.createParameter().returns(parameter);
        HTTPMessageEntities entities = new SimpleHTTPMessageEntities();
        entityFactoryMock.expects.createHTTPMessageEntities().returns(entities);

        expectAddSimpleElementProcess(parameter);

        contextMock.expects.getProperty(WebRequestParameter.class).returns(
                null);
        contextMock.expects.setProperty(WebRequestParameter.class,
                entities, false);

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        addAttribute("name", name);
        addAttribute("value", value);
        addAttribute("from", from);
        addAttribute("target", target);

        DynamicElementRule rule = new ParameterRule(entityFactoryMock);
        XMLProcess process = (XMLProcess) rule.startElement(dynamicProcessMock,
                elementName, attributes);

        dynamicProcessMock.expects.removeProcess(process);

        rule.endElement(dynamicProcessMock, elementName, process);

        assertNotNull(parameter);

        if (name == null) {
            assertEquals("Name value should match", from,
                    parameter.getName());
        } else {
            assertEquals("Name value should match", name,
                    parameter.getName());
        }
        assertEquals("Value value should match", value,
                parameter.getValue());
        assertEquals("From value should match", from,
                parameter.getFrom());
        assertEquals("Target value should match", target,
                parameter.getTarget());
    }
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.drivers.web.WebRequestParameter

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.