Package org.fest.assertions.core
Interface Descriptable<S>
- Type Parameters:
S- the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
- All Known Subinterfaces:
Assert<S,A>
- All Known Implementing Classes:
AbstractAssert,AbstractComparableAssert,AbstractIterableAssert,AbstractUnevenComparableAssert,AllOf,AnyOf,BigDecimalAssert,BooleanArrayAssert,BooleanAssert,ByteArrayAssert,ByteAssert,CharacterAssert,CharArrayAssert,Condition,DateAssert,DoesNotHave,DoubleArrayAssert,DoubleAssert,FileAssert,FloatArrayAssert,FloatAssert,InputStreamAssert,IntArrayAssert,IntegerAssert,IterableAssert,Join,ListAssert,LongArrayAssert,LongAssert,MapAssert,Negative,Not,ObjectArrayAssert,ObjectAssert,ShortArrayAssert,ShortAssert,StringAssert,ThrowableAssert
public interface Descriptable<S>
An object that has a description.
- Author:
- Alex Ruiz, Yvonne Wang
-
Method Summary
Modifier and TypeMethodDescriptionSets the description of this object.as(Description description) Sets the description of this object.describedAs(String description) Alias forsince "as" is a keyword in Groovy.as(String)describedAs(Description description) Alias forsince "as" is a keyword in Groovy.as(String)
-
Method Details
-
as
Sets the description of this object.- Parameters:
description- the new description to set.- Returns:
thisobject.- Throws:
NullPointerException- if the description isnull.- See Also:
-
as
Sets the description of this object. To remove or clear the description, pass aas argument.EmptyTextDescriptionThis overloaded version of "describedAs" offers more flexibility than the one taking a
Stringby allowing users to pass their own implementation of a description. For example, a description that creates its value lazily, only when an assertion failure occurs.- Parameters:
description- the new description to set.- Returns:
thisobject.- Throws:
NullPointerException- if the description isnull.- See Also:
-
describedAs
Alias forsince "as" is a keyword in Groovy.as(String)- Parameters:
description- the new description to set.- Returns:
thisobject.- Throws:
NullPointerException- if the description isnull.
-
describedAs
Alias forsince "as" is a keyword in Groovy. To remove or clear the description, pass aas(String)as argument.EmptyTextDescriptionThis overloaded version of "describedAs" offers more flexibility than the one taking a
Stringby allowing users to pass their own implementation of a description. For example, a description that creates its value lazily, only when an assertion failure occurs.- Parameters:
description- the new description to set.- Returns:
thisobject.- Throws:
NullPointerException- if the description isnull.
-