@Test public void testXPathIsFoundInStringWithMultipleOccurences() throws Exception { String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<feed>" + " <title>title</title>" + " <entry>" + " <title>title1</title>" + " <id>id1</id>" + " </entry>" + " <entry>" + " <title>title2</title>" + " <id>id2</id>" + " </entry>" + "</feed>"; assertThat(xml, hasXPath(" assertThat(xml, hasXPath(" assertThat(xml, not(hasXPath(" }
@Factory public static HasXPathMatcher hasXPath(String xPath) { return new HasXPathMatcher(xPath); }
HasXPathMatcher extends BaseMatcher<Object> { @Factory public static HasXPathMatcher hasXPath(String xPath) { return new HasXPathMatcher(xPath); } }
HasXPathMatcher extends BaseMatcher<Object> { @Factory public static HasXPathMatcher hasXPath(String xPath) { return new HasXPathMatcher(xPath); } HasXPathMatcher(String xPath); }
HasXPathMatcher extends BaseMatcher<Object> { @Factory public static HasXPathMatcher hasXPath(String xPath) { return new HasXPathMatcher(xPath); } HasXPathMatcher(String xPath); HasXPathMatcher withDocumentBuilderFactory(DocumentBuilderFactory f); HasXPathMatcher withXPathFactory(XPathFactory f); @Override boolean matches(Object object); @Override void describeTo(Description description); @Override void describeMismatch(Object item, Description mismatchDescription); @Factory static HasXPathMatcher hasXPath(String xPath); HasXPathMatcher withNamespaceContext(Map<String, String> prefix2Uri); }
HasXPathMatcher extends BaseMatcher<Object> { @Factory public static HasXPathMatcher hasXPath(String xPath) { return new HasXPathMatcher(xPath); } HasXPathMatcher(String xPath); HasXPathMatcher withDocumentBuilderFactory(DocumentBuilderFactory f); HasXPathMatcher withXPathFactory(XPathFactory f); @Override boolean matches(Object object); @Override void describeTo(Description description); @Override void describeMismatch(Object item, Description mismatchDescription); @Factory static HasXPathMatcher hasXPath(String xPath); HasXPathMatcher withNamespaceContext(Map<String, String> prefix2Uri);  }