congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
HasXPath.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.hamcrest.xml.HasXPath
constructor

Best Java code snippets using org.hamcrest.xml.HasXPath.<init> (Showing top 9 results out of 315)

origin: hamcrest/JavaHamcrest

  /**
   * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node contains a node
   * at the specified <code>xPath</code> within the specified namespace context, with any content.
   * For example:
   * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs))</pre>
   * 
   * @param xPath
   *     the target xpath
   * @param namespaceContext
   *     the namespace for matching nodes
   */
  public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext) {
    return new HasXPath(xPath, namespaceContext, WITH_ANY_CONTENT, XPathConstants.NODE);
  }
}
origin: hamcrest/JavaHamcrest

/**
 * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node has a value at the
 * specified <code>xPath</code>, within the specified <code>namespaceContext</code>, that satisfies
 * the specified <code>valueMatcher</code>.
 * For example:
 * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs, equalTo("Cheddar")))</pre>
 * 
 * @param xPath
 *     the target xpath
 * @param namespaceContext
 *     the namespace for matching nodes
 * @param valueMatcher
 *     matcher for the value at the specified xpath
 */
public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext, Matcher<String> valueMatcher) {
  return new HasXPath(xPath, namespaceContext, valueMatcher, STRING);
}
origin: org.hamcrest/hamcrest-all

  /**
   * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node contains a node
   * at the specified <code>xPath</code> within the specified namespace context, with any content.
   * <p/>
   * For example:
   * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs))</pre>
   * 
   * @param xPath
   *     the target xpath
   * @param namespaceContext
   *     the namespace for matching nodes
   */
  @Factory
  public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext) {
    return new HasXPath(xPath, namespaceContext, WITH_ANY_CONTENT, XPathConstants.NODE);
  }
}
origin: org.hamcrest/hamcrest-all

/**
 * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node has a value at the
 * specified <code>xPath</code>, within the specified <code>namespaceContext</code>, that satisfies
 * the specified <code>valueMatcher</code>.
 * <p/>
 * For example:
 * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs, equalTo("Cheddar")))</pre>
 * 
 * @param xPath
 *     the target xpath
 * @param namespaceContext
 *     the namespace for matching nodes
 * @param valueMatcher
 *     matcher for the value at the specified xpath
 */
@Factory
public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext, Matcher<String> valueMatcher) {
  return new HasXPath(xPath, namespaceContext, valueMatcher, STRING);
}
origin: org.hamcrest/java-hamcrest

  /**
   * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node contains a node
   * at the specified <code>xPath</code> within the specified namespace context, with any content.
   * For example:
   * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs))</pre>
   * 
   * @param xPath
   *     the target xpath
   * @param namespaceContext
   *     the namespace for matching nodes
   */
  public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext) {
    return new HasXPath(xPath, namespaceContext, WITH_ANY_CONTENT, XPathConstants.NODE);
  }
}
origin: org.hamcrest/java-hamcrest

/**
 * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node has a value at the
 * specified <code>xPath</code>, within the specified <code>namespaceContext</code>, that satisfies
 * the specified <code>valueMatcher</code>.
 * For example:
 * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs, equalTo("Cheddar")))</pre>
 * 
 * @param xPath
 *     the target xpath
 * @param namespaceContext
 *     the namespace for matching nodes
 * @param valueMatcher
 *     matcher for the value at the specified xpath
 */
public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext, Matcher<String> valueMatcher) {
  return new HasXPath(xPath, namespaceContext, valueMatcher, STRING);
}
origin: org.hamcrest/hamcrest

  /**
   * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node contains a node
   * at the specified <code>xPath</code> within the specified namespace context, with any content.
   * For example:
   * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs))</pre>
   * 
   * @param xPath
   *     the target xpath
   * @param namespaceContext
   *     the namespace for matching nodes
   */
  public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext) {
    return new HasXPath(xPath, namespaceContext, WITH_ANY_CONTENT, XPathConstants.NODE);
  }
}
origin: org.hamcrest/hamcrest

/**
 * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node has a value at the
 * specified <code>xPath</code>, within the specified <code>namespaceContext</code>, that satisfies
 * the specified <code>valueMatcher</code>.
 * For example:
 * <pre>assertThat(xml, hasXPath("/root/something[2]/cheese", myNs, equalTo("Cheddar")))</pre>
 * 
 * @param xPath
 *     the target xpath
 * @param namespaceContext
 *     the namespace for matching nodes
 * @param valueMatcher
 *     matcher for the value at the specified xpath
 */
public static Matcher<Node> hasXPath(String xPath, NamespaceContext namespaceContext, Matcher<String> valueMatcher) {
  return new HasXPath(xPath, namespaceContext, valueMatcher, STRING);
}
origin: org.hamcrest/com.springsource.org.hamcrest

@Factory
public static Matcher<Node> hasXPath(String xPath, Matcher<String> valueMatcher) {
  return new HasXPath(xPath, valueMatcher);
}
org.hamcrest.xmlHasXPath<init>

Popular methods of HasXPath

  • hasXPath
    Creates a matcher of org.w3c.dom.Nodes that matches when the examined node has a value at the specif
  • compiledXPath
  • evaluated

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Collectors (java.util.stream)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now