Package org.apache.cocoon.environment.mock

Examples of org.apache.cocoon.environment.mock.MockRequest.addParameter()


        });
       
        // Change value to "bar", still without explicit validation
        // That will call the event listener
        request = new MockRequest();
        request.addParameter("stringfield", "bar");
        request.addParameter("button", "pressed");
        form.process(new FormContext(request));
    }
   
    /**
 
View Full Code Here


       
        // Change value to "bar", still without explicit validation
        // That will call the event listener
        request = new MockRequest();
        request.addParameter("stringfield", "bar");
        request.addParameter("button", "pressed");
        form.process(new FormContext(request));
    }
   
    /**
     * Request parameters are not read when a field is not in active state
View Full Code Here

        // Disable the form
        form.setState(WidgetState.DISABLED);
        field.setValue("foo");
       
        request = new MockRequest();
        request.addParameter("stringfield", "bar");
        form.process(new FormContext(request));
       
        // Check that "bar" was not read
        assertEquals("foo", field.getValue());
       
View Full Code Here

    public void testNestedExpressions() throws PatternException, ComponentException {
        String expr = "{request-param:{request-param:foo}}";
        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "bar");
        request.addParameter("bar", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));
       
        Map sitemapElements = new HashMap();
View Full Code Here

    public void testNestedExpressions() throws PatternException, ComponentException {
        String expr = "{request-param:{request-param:foo}}";
        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "bar");
        request.addParameter("bar", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));
       
        Map sitemapElements = new HashMap();
        context.pushMap("sitemap", sitemapElements);
View Full Code Here

    public void testNestedModuleAndSitemapExpressions() throws PatternException, ComponentException {
        String expr = "{request-param:f{1}}";
        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));
       
        Map sitemapElements = new HashMap();
        sitemapElements.put("1", "oo");
View Full Code Here

    public void testNestedExpressions() throws Exception {
        String expr = "{request-param:{request-param:foo}}";
        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "bar");
        request.addParameter("bar", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(getLogger());
       
        Map sitemapElements = new HashMap();
View Full Code Here

    public void testNestedExpressions() throws Exception {
        String expr = "{request-param:{request-param:foo}}";
        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "bar");
        request.addParameter("bar", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(getLogger());
       
        Map sitemapElements = new HashMap();
        context.pushMap("sitemap", sitemapElements);
View Full Code Here

    public void testNestedModuleAndSitemapExpressions() throws Exception {
        String expr = "{request-param:f{1}}";
        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(getLogger());
       
        Map sitemapElements = new HashMap();
        sitemapElements.put("1", "oo");
View Full Code Here

        Field field = (Field)form.getChild("intfield");
        Action button = (Action)form.getChild("action");
        MockRequest request;
       
        request = new MockRequest();
        request.addParameter("intfield", "11");
        request.addParameter("action", "pressed");
        form.process(new FormContext(request));
       
        // No parsing nor validation where performed
        Document doc = WidgetTestHelper.getWidgetFragment(field, null);
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.