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

public Class ShouldBe

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
ShouldBe(Object actual, Condition<?> condition)

private <T>
ShouldBe(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.
shouldBe
(T
the actual value in the failed assertion.
actual
,
Condition<? super T>
the Condition.
condition
)

Creates a new ShouldBe.

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

Constructor Detail

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

Method Detail

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

Creates a new ShouldBe.

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.