Package net.serenitybdd.screenplay
Class UseAnAbility
java.lang.Object
net.serenitybdd.screenplay.UseAnAbility
public class UseAnAbility
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description static UseAnAbility
of(Actor actor)
<C> C
that(java.lang.Class<C> implementedInterface)
If theactor
has anAbility
that implements the Interface, return that.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
of
-
that
public <C> C that(java.lang.Class<C> implementedInterface)If theactor
has anAbility
that implements the Interface, return that. If there are multiple candidate Abilities, the first one found will be returned.- Type Parameters:
C
- the implementation of the Interface- Parameters:
implementedInterface
- the Interface class that we expect to find- Returns:
- the Ability that implements the interface
-