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

Build the concept of Personas directly into the Cast #134

Closed craigfowler closed 6 years ago

craigfowler commented 6 years ago

The cast could be improved by using a strongly-typed reference to actors: the persona.

This is an idea taken from the Agiil project but I could easily be part of the core, via an interface:

public interface IPersona
{
  string Name { get; }
}

Use of a generic reference for things such as Get etc would prevent the need to keep hard-coding the actor name. Other information relevant to the actor could also be kept with the same class.