Package org.custommonkey.xmlunit

Examples of org.custommonkey.xmlunit.NamespaceContext


    servlet.setBeanConverters(new BeanJsonConverter(injector),
        new BeanXStreamConverter(new XStream081Configuration(injector)),
        new BeanXStreamAtomConverter(new XStream081Configuration(injector)));

    res = EasyMock.createMock(HttpServletResponse.class);
    NamespaceContext ns = new SimpleNamespaceContext(ImmutableMap.of("", "http://ns.opensocial.org/2008/opensocial"));
    XMLUnit.setXpathNamespaceContext(ns);
    xp = XMLUnit.newXpathEngine();
  }
View Full Code Here


    protected void setUpNSContext() {
        Map m = new HashMap();
        m.put("ms", "http://services.samples/xsd");
        m.put("ns", "http://services.samples/xsd");
        NamespaceContext nsCtx = new SimpleNamespaceContext(m);
        XMLUnit.setXpathNamespaceContext(nsCtx);
    }
View Full Code Here

        namespaces.put("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        namespaces.put("wms", "http://www.opengis.net/wms");
        namespaces.put("ows", "http://www.opengis.net/ows");
        namespaces.put("ogc", "http://www.opengis.net/ogc");

        NamespaceContext ctx = new SimpleNamespaceContext(namespaces);
        XMLUnit.setXpathNamespaceContext(ctx);

        GeoServerInfo global = getGeoServer().getGlobal();
        global.getSettings().setProxyBaseUrl("src/test/resources/geoserver");
        getGeoServer().save(global);
View Full Code Here

        }
    }
   
    @Test
    public void testOpenLayersProxy() throws Exception {
        NamespaceContext oldContext = XMLUnit.getXpathNamespaceContext();
        try {
            Map<String, String> namespaces = new HashMap<String, String>();
            namespaces.put("xhtml", "http://www.w3.org/1999/xhtml");
            registerNamespaces(namespaces);
            XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
View Full Code Here

        namespaces.put("ogc", "http://www.opengis.net/ogc");
        namespaces.put("wfs", "http://www.opengis.net/wfs");
        namespaces.put("gml", "http://www.opengis.net/gml");
        namespaces.put(WCS_PREFIX, WCS_URI);

        NamespaceContext ctx = new SimpleNamespaceContext(namespaces);
        XMLUnit.setXpathNamespaceContext(ctx);

        Logging.getLogger("org.geoserver.ows").setLevel(Level.OFF);
        WMSInfo wmsInfo = getGeoServer().getService(WMSInfo.class);
        wmsInfo.setMaxBuffer(50);
View Full Code Here

        testData.copyTo(getClass().getResourceAsStream("/planet-42.png"), "styles/planet-42.png");
       
        HashMap m = new HashMap();
        m.put("kml", "http://www.opengis.net/kml/2.2");

        NamespaceContext ctx = new SimpleNamespaceContext(m);
        XMLUnit.setXpathNamespaceContext(ctx);
    }
View Full Code Here

        List<String> layerNames = Lists.newArrayList(tld.getLayerNames());
        Collections.sort(layerNames);
        assertXpathExists("/layers", dom);

        NamespaceContext ctx = new SimpleNamespaceContext(ImmutableMap.of("atom",
                "http://www.w3.org/2005/Atom"));
        XpathEngine xpathEngine = XMLUnit.newXpathEngine();
        xpathEngine.setNamespaceContext(ctx);

        for (int i = 0; i < layerNames.size(); i++) {
View Full Code Here

TOP

Related Classes of org.custommonkey.xmlunit.NamespaceContext

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.