public class J8Matchers extends J7Matchers
J8Matchers class groups all the matchers from {J7Matchers} plus the new ones introduced by Cirneco's
Hamcrest extension for Java 8. Suggested use would be to import all the static methods of this class in a unit tes.| Constructor and Description |
|---|
J8Matchers() |
| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<Optional> |
emptyOptional()
Creates a matcher that matches when the examined Optional contains no object.
|
static org.hamcrest.Matcher<Optional> |
notPresent()
Creates a matcher that matches when the examined Optional contains no object.
|
static org.hamcrest.Matcher<Optional> |
present()
Creates a matcher that matches when the examined Optional contains no object.
|
static <T> org.hamcrest.TypeSafeMatcher<Optional<T>> |
presentAnd(org.hamcrest.Matcher<? super T> innerMatcher)
Creates a matcher from an inner matcher for Optionals which are present.
|
after, afterOrEqual, april, august, before, beforeOrEqual, between, betweenInclusive, betweenLowerBoundInclusive, betweenUpperBoundInclusive, containedIn, containsInAnyOrder, containsInOrder, containsInRelativeOrder, december, email, empty, february, friday, hasDay, hasDistinctElements, hasHour, hasHour, hasHourAndMin, hasHourAndMin, hasHourMinAndSec, hasHourMinAndSec, hasHourMinSecAndMillis, hasHourMinSecAndMillis, hasMillisecond, hasMinute, hasMonth, hasNoArgumentConstructor, hasRuntimeAnnotation, hasSameKeySet, hasSecond, hasSize, hasSizeFive, hasSizeFour, hasSizeOne, hasSizeThree, hasSizeTwo, hasToStringContainingInOrder, hasYear, hasYearAndMonth, hasYearMonthAndDay, infinity, inWeekOfYear, january, july, june, leapYear, march, may, monday, negative, negativeInfinity, notANumber, november, october, positive, positiveInfinity, sameHashcode, sameInstance, sameSizeOf, saturday, september, similar, sorted, sorted, sortedReversed, sortedReversed, subsetOf, sunday, thursday, tuesday, wednesday, yamlpublic static org.hamcrest.Matcher<Optional> emptyOptional()
public static org.hamcrest.Matcher<Optional> notPresent()
public static org.hamcrest.Matcher<Optional> present()
Copyright © 2015–2016. All rights reserved.