csf-dev / CSF.Screenplay

Implementation of the Screenplay pattern (aka Journey) in .NET
https://csf-dev.github.io/CSF.Screenplay/
MIT License
13 stars 1 forks source link

Add additional overloads to the Stage implementation, supporting limited Cast-related functionality #138

Closed craigfowler closed 6 years ago

craigfowler commented 6 years ago

There is an oddity at the moment whereby the IStage and the ICast are very closely linked. Almost any time that we want to use a stage, we will first need a cast in order to get the actor in the first place. This is particularly evident in SpecFlow-based tests.

What I would like to do is to add a little bit of functionality to the stage interface, which semi-duplicates functionality on the cast, so that a separate cast is no longer required. These new methods would be overloads of the ShineTheSpotlightOn method:

All of these overloads would have the following functionality:

  1. Make use of an ICast instance (which the stage shall take as a dependency) to get the actor by either their persona or their name.
  2. Shine the spotlight upon that actor
  3. Return the actor