@Test public void createsAUsefulMessageWhenFailingCombinedWithNotOnTheInside() throws Exception { thrown.expect(AssertionError.class); thrown.expectMessage("XML with XPath count( String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<fruits>" + "<fruit name=\"apple\"/>" + "<fruit name=\"orange\"/>" + "<fruit name=\"banana\"/>" + "</fruits>"; assertThat(xml, hasXPath("count( }
@Factory public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) { return new EvaluateXPathMatcher(xPath, valueMatcher); }
EvaluateXPathMatcher extends BaseMatcher<Object> { @Factory public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) { return new EvaluateXPathMatcher(xPath, valueMatcher); } }
EvaluateXPathMatcher extends BaseMatcher<Object> { @Factory public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) { return new EvaluateXPathMatcher(xPath, valueMatcher); } EvaluateXPathMatcher(String xPath, Matcher<String> valueMatcher); }
EvaluateXPathMatcher extends BaseMatcher<Object> { @Factory public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) { return new EvaluateXPathMatcher(xPath, valueMatcher); } EvaluateXPathMatcher(String xPath, Matcher<String> valueMatcher); @Factory static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher); EvaluateXPathMatcher withDocumentBuilderFactory(DocumentBuilderFactory f); EvaluateXPathMatcher withXPathFactory(XPathFactory f); @Override boolean matches(Object object); @Override void describeTo(Description description); @Override void describeMismatch(Object object, Description mismatchDescription); EvaluateXPathMatcher withNamespaceContext(Map<String, String> prefix2Uri); }
EvaluateXPathMatcher extends BaseMatcher<Object> { @Factory public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) { return new EvaluateXPathMatcher(xPath, valueMatcher); } EvaluateXPathMatcher(String xPath, Matcher<String> valueMatcher); @Factory static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher); EvaluateXPathMatcher withDocumentBuilderFactory(DocumentBuilderFactory f); EvaluateXPathMatcher withXPathFactory(XPathFactory f); @Override boolean matches(Object object); @Override void describeTo(Description description); @Override void describeMismatch(Object object, Description mismatchDescription); EvaluateXPathMatcher withNamespaceContext(Map<String, String> prefix2Uri);  }