org.assertj.core.error
Class ShouldHave

java.lang.Object
  extended by org.assertj.core.error.BasicErrorMessageFactory
      extended by org.assertj.core.error.ShouldHave
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldHave
extends BasicErrorMessageFactory

Creates an error message indicating that an assertion that verifies that a value satisfies a Condition failed.

Author:
Yvonne Wang, Mikhail Mazursky

Field Summary
 
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format
 
Method Summary
static
<T> ErrorMessageFactory
shouldHave(T actual, Condition<? super T> condition)
          Creates a new ShouldHave.
 
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, equals, hashCode, toString, unquotedString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

shouldHave

public static <T> ErrorMessageFactory shouldHave(T actual,
                                                 Condition<? super T> condition)
Creates a new ShouldHave.

Type Parameters:
T - guarantees that the type of the actual value and the generic type of the Condition are the same.
Parameters:
actual - the actual value in the failed assertion.
condition - the Condition.
Returns:
the created ErrorMessageFactory.


Copyright © 2013–2015 AssertJ. All rights reserved.