Top Description Fields Constructors Methods
org.assertj.core.error

public Class OptionalShouldContainInstanceOf

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
java.lang.String.format

Build an error message when a value should be instance of a specific class.
Author
Alban Dericbourg

Field Summary

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static OptionalShouldContainInstanceOf

Returns:

an error message factory.
shouldContainInstanceOf
(Object
Optional to be checked.
value
,
Class<?>
the class to check the optional value against
clazz
)

Indicates that a value should be present in an empty java.util.Optional.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

OptionalShouldContainInstanceOfback to summary
private OptionalShouldContainInstanceOf(String message)

Method Detail

shouldContainInstanceOfback to summary
public static OptionalShouldContainInstanceOf shouldContainInstanceOf(Object value, Class<?> clazz)

Indicates that a value should be present in an empty java.util.Optional.

Parameters
value:Object

Optional to be checked.

clazz:Class<?>

the class to check the optional value against

Returns:OptionalShouldContainInstanceOf

an error message factory.

Exceptions
NullPointerException:
if optional is null.