public class Matchers extends Object
| Constructor and Description |
|---|
Matchers() |
| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<File> |
fileNamed(String name)
Obtain a matcher for
File instances with given name. |
static org.hamcrest.Matcher<org.dom4j.Element> |
isElement(org.dom4j.Element expected)
Obtain an equality matcher for
Element. |
static <T> org.hamcrest.Matcher<Optional<T>> |
isPresent()
Matcher for an
Optional, matching on present. |
static <T> org.hamcrest.Matcher<Optional<T>> |
notPresent()
Matcher for an
Optional, matching on not present. |
static <T> org.hamcrest.Matcher<? super Optional<T>> |
presentWithValue(org.hamcrest.Matcher<T> valueMatcher)
Matcher for an
Optional, matching when present and the value matching the input. |
static org.hamcrest.Matcher<URI> |
uriWithPath(String path)
Obtain a matcher for
URI instances with given path. |
public static org.hamcrest.Matcher<File> fileNamed(String name)
File instances with given name.name - the expected name of the file.File.getName() is Matchers.equalTo(T) name.public static org.hamcrest.Matcher<URI> uriWithPath(String path)
URI instances with given path.path - the expected path of the URI.URI.getPath() is Matchers.equalTo(T) path.public static org.hamcrest.Matcher<org.dom4j.Element> isElement(org.dom4j.Element expected)
Element.
Uses NodeComparator as Element doesn't provide equals or compareTo.
public static <T> org.hamcrest.Matcher<Optional<T>> isPresent()
Optional, matching on present.public static <T> org.hamcrest.Matcher<Optional<T>> notPresent()
Optional, matching on not present.Copyright © 2019 Atlassian. All rights reserved.