use of org.custommonkey.xmlunit.NamespaceContext in project sling by apache.
the class ReferenceTypeHintTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
postUrl = HTTP_BASE_URL + TEST_BASE_PATH + "/" + System.currentTimeMillis();
Map<String, String> m = new HashMap<String, String>();
m.put("sv", "http://www.jcp.org/jcr/sv/1.0");
NamespaceContext ctx = new SimpleNamespaceContext(m);
XMLUnit.setXpathNamespaceContext(ctx);
final NameValuePairList props = new NameValuePairList();
props.add("a", "");
props.add("jcr:mixinTypes", "mix:referenceable");
firstCreatedNodeUrl = testClient.createNode(postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX, props, null, false);
firstUuid = getProperty(firstCreatedNodeUrl, "jcr:uuid");
firstPath = getPath(firstCreatedNodeUrl);
secondCreatedNodeUrl = testClient.createNode(postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX, props, null, false);
secondUuid = getProperty(secondCreatedNodeUrl, "jcr:uuid");
secondPath = getPath(secondCreatedNodeUrl);
}
use of org.custommonkey.xmlunit.NamespaceContext in project ddf by codice.
the class TestCswFilterDelegate method setupTestClass.
@BeforeClass
public static void setupTestClass() throws JAXBException, ParseException {
XMLUnit.setIgnoreWhitespace(true);
marshaller = JAXB_CONTEXT.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
POS_LIST_GEO_FILTER_PROP_MAP.put(USE_POS_LIST_GEO_FILTER_PROP_MAP_KEY, "true");
SAMPLE_DISTANCE_GEO_FILTER_PROP_MAP.put(DISTANCE_GEO_FILTER_PROP_MAP_KEY, Double.toString(SAMPLE_DISTANCE));
SAMPLE_DISTANCE_POS_LIST_GEO_FILTER_PROP_MAP.put(USE_POS_LIST_GEO_FILTER_PROP_MAP_KEY, "true");
SAMPLE_DISTANCE_POS_LIST_GEO_FILTER_PROP_MAP.put(DISTANCE_GEO_FILTER_PROP_MAP_KEY, Double.toString(SAMPLE_DISTANCE));
THOUSAND_METER_DISTANCE_GEO_FILTER_PROP_MAP.put(DISTANCE_GEO_FILTER_PROP_MAP_KEY, "1000.0");
// XPath query support.
HashMap<String, String> map = new HashMap<>();
map.put("", "http://www.opengis.net/cat/csw/2.0.2");
map.put("ogc", "http://www.opengis.net/ogc");
NamespaceContext ctx = new SimpleNamespaceContext(map);
XMLUnit.setXpathNamespaceContext(ctx);
}
use of org.custommonkey.xmlunit.NamespaceContext in project ddf by codice.
the class TestXmlMetacardTransformer method setupXpath.
@Before
public void setupXpath() {
Map<String, String> m = new HashMap<String, String>();
m.put("m", "urn:catalog:metacard");
m.put("gml", "http://www.opengis.net/gml");
NamespaceContext ctx = new SimpleNamespaceContext(m);
XMLUnit.setXpathNamespaceContext(ctx);
}
use of org.custommonkey.xmlunit.NamespaceContext in project ddf by codice.
the class AbstractTestCompositeGeometry method setupTestClass.
@BeforeClass
public static void setupTestClass() {
HashMap map = new HashMap();
map.put("gml", "http://www.opengis.net/gml");
map.put("georss", "http://www.georss.org/georss");
NamespaceContext ctx = new SimpleNamespaceContext(map);
XMLUnit.setXpathNamespaceContext(ctx);
XMLUnit.setIgnoreWhitespace(true);
}
use of org.custommonkey.xmlunit.NamespaceContext in project ddf by codice.
the class TestXmlResponseQueueTransformer method setupTestClass.
@BeforeClass
public static void setupTestClass() {
// makes xpaths easier to write when prefixes are declared beforehand.
HashMap<String, String> map = new HashMap<>();
map.put("gml", "http://www.opengis.net/gml");
map.put("mc", "urn:catalog:metacard");
NamespaceContext ctx = new SimpleNamespaceContext(map);
XMLUnit.setXpathNamespaceContext(ctx);
}
Aggregations