/* Copyright (c) 2001 - 2009 TOPP - www.openplans.org. All rights reserved.
* This code is licensed under the GPL 2.0 license, availible at the root
* application directory.
*/
package org.geoserver.catalog.rest;
import java.util.HashMap;
import java.util.Map;
import org.custommonkey.xmlunit.SimpleNamespaceContext;
import org.custommonkey.xmlunit.XMLUnit;
import org.custommonkey.xmlunit.XpathEngine;
import org.geoserver.catalog.Catalog;
import org.geoserver.test.GeoServerTestSupport;
public abstract class CatalogRESTTestSupport extends GeoServerTestSupport {
protected Catalog catalog;
protected XpathEngine xp;
@Override
protected void setUpInternal() throws Exception {
super.setUpInternal();
catalog = getCatalog();
Map<String, String> namespaces = new HashMap<String, String>();
namespaces.put("html", "http://www.w3.org/1999/xhtml");
namespaces.put("sld", "http://www.opengis.net/sld");
namespaces.put("ogc", "http://www.opengis.net/ogc");
namespaces.put("atom", "http://www.w3.org/2005/Atom");
XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
xp = XMLUnit.newXpathEngine();
}
}