|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
S
- the "self" type of this assertion class. Please read
"Emulating 'self types' using Java Generics to simplify fluent
API implementation" for more details.public interface Descriptable<S>
An object that has a description.
Method Summary | |
---|---|
S |
as(Description description)
Sets the description of this object. |
S |
as(String description)
Sets the description of this object. |
S |
describedAs(Description description)
Alias for since "as" is a keyword in Groovy. |
S |
describedAs(String description)
Alias for since "as" is a keyword in Groovy. |
Method Detail |
---|
S as(String description)
description
- the new description to set.
this
object.
NullPointerException
- if the description is null
.describedAs(String)
S as(Description description)
EmptyTextDescription
as argument.
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.
description
- the new description to set.
this
object.
NullPointerException
- if the description is null
.describedAs(Description)
S describedAs(String description)
as(String)
since "as" is a keyword in Groovy.
description
- the new description to set.
this
object.
NullPointerException
- if the description is null
.S describedAs(Description description)
as(String)
since "as" is a keyword in Groovy. To remove or clear the description, pass a EmptyTextDescription
as
argument.
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.
description
- the new description to set.
this
object.
NullPointerException
- if the description is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |