Class Scenario

  • All Implemented Interfaces:
    StepCollection, Visitable

    public class Scenario
    extends Object
    implements Visitable, StepCollection
    A scenario that will be analysed by the application.

    It has a title, a list of actors (user- and system actors) and a list of steps that needs to be taken to perform the whole scenario.

    Scenarios are analysed by Visitors. The way of accessing a scenario by a visitor is defined by the Visitable interface

    See Also:
    StepList, Step, Visitable, Visitor
    • Constructor Detail

      • Scenario

        public Scenario​(String title,
                        ArrayList<String> actors,
                        ArrayList<String> systemActors)
        Creates an immutable scenario based on all it's required properties: title, actors (and system actors) and a list of steps.
        Parameters:
        title - title of the scenario
        actors - a list of (user) actors in the scenario
        systemActors - a list of system actors in the scenario
        See Also:
        StepList, Step
    • Method Detail

      • getTitle

        public String getTitle()
        Get the scenario's title.
        Returns:
        title as a string
      • getActors

        public ArrayList<String> getActors()
        Get the (user) actors in the scenario.
        Returns:
        actors as an array of strings
      • getSystemActors

        public ArrayList<String> getSystemActors()
        Get the system actors in the scenario.
        Returns:
        system actors as an array of strings
      • getSteps

        public ArrayList<Component> getSteps()
        Get the steps in the scenario.
        Returns:
        the steps (and lists of them) as (potentially nested) StepList
        See Also:
        StepList, Step
      • accept

        public void accept​(Visitor visitor)
        Disclose the data about the scenario to a visitor and pass it to the list of steps.
        Specified by:
        accept in interface Visitable
        Parameters:
        visitor - Visitor to give information to.
        See Also:
        StepList, Step