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

public Class ShouldHave

extends BasicErrorMessageFactory
Class Inheritance
Imports
org.assertj.core.api.Condition, org.assertj.core.condition.Join

Creates an error message indicating that an assertion that verifies that a value satisfies a Condition failed.
Authors
Yvonne Wang, Mikhail Mazursky

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldHave(Object actual, Condition<?> condition)

private <T>
ShouldHave(T actual, Join<? super T> join)

Method Summary

Modifier and TypeMethod and Description
public static <
guarantees that the type of the actual value and the generic type of the Condition are the same.
T
>
ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHave
(T
the actual value in the failed assertion.
actual
,
Condition<? super T>
the Condition.
condition
)

Creates a new ShouldHave.

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

Constructor Detail

ShouldHaveback to summary
private ShouldHave(Object actual, Condition<?> condition)
ShouldHaveback to summary
private <T> ShouldHave(T actual, Join<? super T> join)

Method Detail

shouldHaveback to summary
public static <T> ErrorMessageFactory shouldHave(T actual, Condition<? super T> condition)

Creates a new ShouldHave.

Parameters
<T>
guarantees that the type of the actual value and the generic type of the Condition are the same.
actual:T

the actual value in the failed assertion.

condition:Condition<? super T>

the Condition.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.