Class PathMatcher

  • All Implemented Interfaces:
    ToNode

    public final class PathMatcher
    extends java.lang.Object
    implements ToNode
    A Matcher implementation for inputPathList, outputPathList, and errorPathList.
    • Constructor Detail

      • PathMatcher

        public PathMatcher​(java.lang.String path,
                           java.lang.String expected,
                           PathComparator comparator)
        Parameters:
        path - The path to execute.
        expected - The expected value of the path.
        comparator - Comparison performed on the list value.
    • Method Detail

      • getPath

        public java.lang.String getPath()
        Gets the path to execute.
        Returns:
        Returns the path to execute.
      • getExpected

        public java.lang.String getExpected()
        Gets the expected return value of each element returned by the path.
        Returns:
        The return value to compare each result against.
      • getComparator

        public PathComparator getComparator()
        Gets the comparison performed on the list.
        Returns:
        Returns the comparator.
      • fromNode

        public static PathMatcher fromNode​(Node node)
        Creates a new instance from a Node.
        Parameters:
        node - Node tom create the PathMatcher from.
        Returns:
        Returns the created PathMatcher.
        Throws:
        ExpectationNotMetException - if the given Node is invalid.
      • toNode

        public Node toNode()
        Description copied from interface: ToNode
        Converts a value to a Node.
        Specified by:
        toNode in interface ToNode
        Returns:
        Returns the creates Node.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object