java.lang.Object
net.serenitybdd.screenplay.actors.Cast

public class Cast extends Object
Provide simple support for managing Screenplay actors in Cucumber-JVM or JBehave
  • Constructor Details

  • Method Details

    • ofStandardActors

      public static Cast ofStandardActors()
    • whereEveryoneCan

      public static Cast whereEveryoneCan(Ability... abilities)
      Create a Cast object with a list of predefined abilities
    • whereEveryoneCan

      public static Cast whereEveryoneCan(Consumer<Actor>... abilities)
      Create a Cast object where each actor is configured using the provided function. E.g. Cast globeTheatreCast = Cast.whereEveryoneCan(actor -> actor.whoCan(Fetch.some("Coffee")));
    • actorNamed

      public Actor actorNamed(String actorName, Ability... abilities)
    • getActors

      public List<Actor> getActors()
    • dismissAll

      public void dismissAll()
    • assignGeneralAbilitiesTo

      protected void assignGeneralAbilitiesTo(Actor newActor)