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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S
as(java.lang.String description)
Sets the description of this object.S
as(Description description)
Sets the description of this object.S
describedAs(java.lang.String description)
Alias for
since "as" is a keyword in Groovy.as(String)
S
describedAs(Description description)
Alias for
since "as" is a keyword in Groovy.as(String)
-
-
-
Method Detail
-
as
S as(java.lang.String description)
Sets the description of this object.- Parameters:
description
- the new description to set.- Returns:
this
object.- Throws:
java.lang.NullPointerException
- if the description isnull
.- See Also:
describedAs(String)
-
as
S as(Description description)
Sets the description of this object. To remove or clear the description, pass a
as argument.EmptyTextDescription
This overloaded version of "describedAs" offers more flexibility than the one taking a
String
by 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:
this
object.- Throws:
java.lang.NullPointerException
- if the description isnull
.- See Also:
describedAs(Description)
-
describedAs
S describedAs(java.lang.String description)
Alias for
since "as" is a keyword in Groovy.as(String)
- Parameters:
description
- the new description to set.- Returns:
this
object.- Throws:
java.lang.NullPointerException
- if the description isnull
.
-
describedAs
S describedAs(Description description)
Alias for
since "as" is a keyword in Groovy. To remove or clear the description, pass aas(String)
as argument.EmptyTextDescription
This overloaded version of "describedAs" offers more flexibility than the one taking a
String
by 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:
this
object.- Throws:
java.lang.NullPointerException
- if the description isnull
.
-
-