Package org.geoserver.web

Examples of org.geoserver.web.FormTestPage


public class WCSLayerConfigTest extends GeoServerWicketCoverageTestSupport{
    public void testValues() {
       
        login();
        FormTestPage page = new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                CoverageInfo info = getCatalog().getResources(CoverageInfo.class).get(0);
                LayerInfo layer = getCatalog().getLayerByName(info.getName());
                return new WCSLayerConfig(id, new Model(layer));
View Full Code Here


    @Override
    protected void setUpInternal() throws Exception {
        super.setUpInternal();
       
        e = new ReferencedEnvelope(-180,180,-90,90, DefaultGeographicCRS.WGS84);
        tester.startPage(new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new EnvelopePanel(id, e);
            }
        }));
View Full Code Here

        tester = new WicketTester();
        keywords = new ArrayList<String>();
        keywords.add("one");
        keywords.add("two");
        keywords.add("three");
        tester.startPage(new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new KeywordsEditor(id, new Model(keywords));
            }
        }));
View Full Code Here

import org.geoserver.web.GeoServerWicketTestSupport;

public class ConfirmRemovalPanelTest extends GeoServerWicketTestSupport {

    void setupPanel(final CatalogInfo... roots) {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
           
            public Component buildComponent(String id) {
                return new ConfirmRemovalPanel(id, roots);
            }
        }));
View Full Code Here

    protected void setUp() throws Exception {
        tester = new WicketTester();
    }
   
    public void testBasicTable() throws Exception {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new IntegerTable(id, false);
            }
        }));
View Full Code Here

        DataView dv = (DataView) tester.getComponentFromLastRenderedPage("form:panel:listContainer:items");
        assertEquals(10, dv.size());
    }
   
    public void testFullSelection() throws Exception {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
           
            public Component buildComponent(String id) {
                return new IntegerTable(id, true);
            }
        }));
View Full Code Here

        table.setSelection(false);
        assertEquals(0, table.getSelection().size());
    }
   
    public void testSingleSelection() throws Exception {
        tester.startPage(new FormTestPage(new ComponentBuilder() {
           
            public Component buildComponent(String id) {
                return new IntegerTable(id, true);
            }
        }));
View Full Code Here

    FormTestPage page;

    @Override
    protected void setUpInternal() throws Exception {
        polygons = getCatalog().getLayerByName(MockData.BASIC_POLYGONS.getLocalPart());
        page = new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new HTTPLayerConfig(id, new Model(polygons));
            }
        });
View Full Code Here

        assertEquals(0,  page.getSession().getFeedbackMessages().messages(new ErrorLevelFeedbackMessageFilter(FeedbackMessage.ERROR)).size());
    }
   
    public void testInvalid() {
        final LayerInfo polygons = getCatalog().getLayerByName(MockData.BASIC_POLYGONS.getLocalPart());
        FormTestPage page = new FormTestPage(new ComponentBuilder() {
       
            public Component buildComponent(String id) {
                return new HTTPLayerConfig(id, new Model(polygons));
            }
        });
        tester.startPage(page);
        tester.assertComponent("form:panel:cacheAgeMax", TextField.class);
       
        tester.assertRenderedPage(FormTestPage.class);
        FormTester ft = tester.newFormTester("form");
        ft.setValue("panel:cacheAgeMax", "-20");
        ft.submit();
        assertEquals(1,  page.getSession().getFeedbackMessages().messages(new ErrorLevelFeedbackMessageFilter(FeedbackMessage.ERROR)).size());
    }
View Full Code Here

@SuppressWarnings("serial")
public class AttributionLayerConfigTest extends GeoServerWicketTestSupport {
   
    public void testExisting() {
        final LayerInfo layer = getCatalog().getLayerByName(MockData.PONDS.getLocalPart());
        FormTestPage page = new FormTestPage(new ComponentBuilder() {

            public Component buildComponent(String id) {
                return new AttributionLayerConfigPanel(id, new Model(layer));
            }
        }
View Full Code Here

TOP

Related Classes of org.geoserver.web.FormTestPage

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.