Package org.custommonkey.xmlunit

Examples of org.custommonkey.xmlunit.SimpleNamespaceContext


    prefixMap.put("a", Edm.NAMESPACE_EDM_2008_09);
    prefixMap.put("edmx", Edm.NAMESPACE_EDMX_2007_06);
    prefixMap.put("m", Edm.NAMESPACE_M_2007_08);
    prefixMap.put("annoPrefix", "http://annoNamespace");

    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));
  }
View Full Code Here


        callUri("", HttpHeaders.ACCEPT, HttpContentType.APPLICATION_XML + "; charset=iso-latin-1",
            HttpStatusCodes.NOT_ACCEPTABLE);
    final String body = getBody(response);
    Map<String, String> prefixMap = new HashMap<String, String>();
    prefixMap.put("a", Edm.NAMESPACE_M_2007_08);
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));
    assertXpathExists("/a:error", body);
    assertXpathExists("/a:error/a:code", body);
    assertXpathExists("/a:error/a:message", body);
  }
View Full Code Here

    prefixMap.put(Edm.PREFIX_D, Edm.NAMESPACE_D_2007_08);
    prefixMap.put(Edm.PREFIX_M, Edm.NAMESPACE_M_2007_08);
    prefixMap.put(Edm.PREFIX_EDM, Edm.NAMESPACE_EDM_2008_09);
    prefixMap.put(Edm.PREFIX_EDMX, Edm.NAMESPACE_EDMX_2007_06);
    prefixMap.put(Edm.PREFIX_XML, Edm.NAMESPACE_XML_1998);
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));
  }
View Full Code Here

  @BeforeClass
  public static void setup() throws Exception {
    Map<String, String> prefixMap = new HashMap<String, String>();
    prefixMap.put("a", Edm.NAMESPACE_M_2007_08);
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));
  }
View Full Code Here

    Map<String, String> prefixMap = new HashMap<String, String>();
    prefixMap.put("atom", Edm.NAMESPACE_ATOM_2005);
    prefixMap.put("a", Edm.NAMESPACE_APP_2007);
    prefixMap.put("xml", Edm.NAMESPACE_XML_1998);
    prefixMap.put("custom", "http://localhost");
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));

    schemas = new ArrayList<Schema>();

    EdmProvider edmProvider = mock(EdmProvider.class);
    when(edmProvider.getSchemas()).thenReturn(schemas);
View Full Code Here

    final String payload = StringHelper.inputStreamToString(response.getEntity().getContent());

    Map<String, String> prefixMap = new HashMap<String, String>();
    prefixMap.put("a", Edm.NAMESPACE_M_2007_08);
    XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(prefixMap));

    assertXpathExists("a:error", payload);
    assertXpathExists("/a:error/a:code", payload);
    assertXpathExists("/a:error/a:message[@xml:lang=\"en\"]", payload);
  }
View Full Code Here

        Map<String, String> namespaces = new HashMap<String, String>();
        namespaces.put("xlink", "http://www.w3.org/1999/xlink");
        namespaces.put("wfs", "http://www.opengis.net/wfs");
        namespaces.put("gml", "http://www.opengis.net/gml");
        namespaces.put("ogc", "http://www.opengis.net/ogc");
        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
    }
View Full Code Here

        Map<String, String> namespaces = new HashMap<String, String>();
        namespaces.put("xlink", "http://www.w3.org/1999/xlink");
        namespaces.put("wfs", "http://www.opengis.net/wfs");
        namespaces.put("gml", "http://www.opengis.net/gml");
        namespaces.put("ogc", "http://www.opengis.net/ogc");
        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
    }
View Full Code Here

        // prepare xmlunit
        Map<String, String> namespaces = new HashMap<String, String>();
        namespaces.put("csw", CSW.NAMESPACE);
        namespaces.put("ows", OWS.NAMESPACE);
        namespaces.put("rim", rimNamespace);
        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
       
        Document doc = XMLUnit.buildControlDocument(encoded);
        XMLAssert.assertXpathEvaluatesTo("test", "/csw:Capabilities/ows:OperationsMetadata/rim:Slot/@rim:test", doc);
        XMLAssert.assertXpathEvaluatesTo("test content", "/csw:Capabilities/ows:OperationsMetadata/rim:Slot", doc);
    }
View Full Code Here

        namespaces.put("gml", "http://www.opengis.net/gml");
        namespaces.put("xlink", "http://www.w3.org/1999/xlink");
        namespaces.put("xsi", "http://www.w3.org/2001/XMLSchema-instance");
       
        getTestData().registerNamespaces(namespaces);
        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
    }
View Full Code Here

TOP

Related Classes of org.custommonkey.xmlunit.SimpleNamespaceContext

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.