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

public Class ShouldAccept

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
java.util.Objects.requireNonNull

Creates an error message indicating that an assertion that verifies that Predicate accepts a value failed.
Author
Filip Hrisafov

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 <
guarantees that the type of the value value and the generic type of the Predicate are the same.
T
>
ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldAccept
(Predicate<? super T>
the Predicate.
predicate
,
T
the value value in the failed assertion.
value
,
PredicateDescription
predicate description to include in the error message,
description
)

Creates a new ShouldAccept.

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

Constructor Detail

ShouldAcceptback to summary
private ShouldAccept(Object value, PredicateDescription description)

Method Detail

shouldAcceptback to summary
public static <T> ErrorMessageFactory shouldAccept(Predicate<? super T> predicate, T value, PredicateDescription description)

Creates a new ShouldAccept.

Parameters
<T>
guarantees that the type of the value value and the generic type of the Predicate are the same.
predicate:Predicate<? super T>

the Predicate.

value:T

the value value in the failed assertion.

description:PredicateDescription

predicate description to include in the error message,

Returns:ErrorMessageFactory

the created ErrorMessageFactory.