Package org.apache.cocoon.environment.mock

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


        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


        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);
        WidgetTestHelper.assertXPathEquals("Displayed value", "11", VALUE_PATH, doc);
View Full Code Here

        Field field = (Field)form.getChild("intfield");
        Action button = (Action)form.getChild("action");
        MockRequest request;
       
        request = new MockRequest();
        request.addParameter("intfield", "foo");
        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

        Action button = (Action)form.getChild("action");
        MockRequest request;
       
        request = new MockRequest();
        request.addParameter("intfield", "foo");
        request.addParameter("action", "pressed");
        form.process(new FormContext(request));
       
        // No parsing nor validation where performed
        Document doc = WidgetTestHelper.getWidgetFragment(field, null);
        WidgetTestHelper.assertXPathEquals("Displayed velue", "foo", VALUE_PATH, doc);
View Full Code Here

        Field field = (Field)form.getChild("intfield");
        Action button = (Action)form.getChild("action");
        MockRequest request;
       
        request = new MockRequest();
        request.addParameter("intfield", "1");
        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

        Action button = (Action)form.getChild("action");
        MockRequest request;
       
        request = new MockRequest();
        request.addParameter("intfield", "1");
        request.addParameter("action", "pressed");
        form.process(new FormContext(request));
       
        // No parsing nor validation where performed
        Document doc = WidgetTestHelper.getWidgetFragment(field, null);
        WidgetTestHelper.assertXPathEquals("Displayed value", "1", VALUE_PATH, doc);
View Full Code Here

        MockRequest request;
       
        // Set a value in stringfield and submit with an action
        // (no validation, thus no call to doParse())
        request = new MockRequest();
        request.addParameter("stringfield", "bar");
        request.addParameter("action", "pressed");
        form.process(new FormContext(request));
       
        // Verify submit widget, just to be sure that validation did not occur
        assertEquals("Form submit widget", button, form.getSubmitWidget());
View Full Code Here

       
        // Set a value in stringfield and submit with an action
        // (no validation, thus no call to doParse())
        request = new MockRequest();
        request.addParameter("stringfield", "bar");
        request.addParameter("action", "pressed");
        form.process(new FormContext(request));
       
        // Verify submit widget, just to be sure that validation did not occur
        assertEquals("Form submit widget", button, form.getSubmitWidget());
       
View Full Code Here

        MockRequest request;
       
        // Set a value on "stringfield", and submit using an action so that
        // it stays in unparsed state
        request = new MockRequest();
        request.addParameter("stringfield", "foo");
        request.addParameter("action", "pressed");
        form.process(new FormContext(request));

        // Now add an event listener that will check old an new value
        field.addValueChangedListener(new ValueChangedListener (){
View Full Code Here

       
        // Set a value on "stringfield", and submit using an action so that
        // it stays in unparsed state
        request = new MockRequest();
        request.addParameter("stringfield", "foo");
        request.addParameter("action", "pressed");
        form.process(new FormContext(request));

        // Now add an event listener that will check old an new value
        field.addValueChangedListener(new ValueChangedListener (){
            public void valueChanged(ValueChangedEvent event) {
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.