public class OptionalShouldContain extends BasicErrorMessageFactory
Optional should contain a specific value.arguments, format| Modifier and Type | Method and Description |
|---|---|
static OptionalShouldContain |
shouldContain(Object expectedValue)
Indicates that an
Optional is empty so it doesn't contain the expected value. |
static <T> OptionalShouldContain |
shouldContain(Optional<T> optional,
T expectedValue)
Indicates that the provided
Optional does not contain the provided argument. |
create, create, equals, hashCode, toString, unquotedStringpublic static <T> OptionalShouldContain shouldContain(Optional<T> optional, T expectedValue)
Optional does not contain the provided argument.public static OptionalShouldContain shouldContain(Object expectedValue)
Optional is empty so it doesn't contain the expected value.expectedValue - the value we expect to be in an Optional.Copyright © 2014-2015 AssertJ. All Rights Reserved.