Class ScenarioQualityChecker
java.lang.Object
pl.put.poznan.qualitychecker.logic.ScenarioQualityChecker
Class containing the main logic of the application. It
 has implementations of all operations that can be executed
 on a scenario.
- 
Constructor SummaryConstructorsConstructorDescriptionScenarioQualityChecker(Scenario scenario) Creates a new instance of classScenarioQualityChecker.
- 
Method SummaryModifier and TypeMethodDescriptionComputes the total number of steps within a scenario, including steps that are in all nested scenarios.Computes the total number of all conditional decisions in the scenario (composite steps, starting with a keyword).executeActions(List<String> actions) Executes specified actions on a scenario.Finds all steps within a scenario at any level of nesting that do not start with an actor.Simplifies the scenario by restricting it to a certain maximum level of nesting.toText()Transforms the scenario into its textual representation.
- 
Constructor Details- 
ScenarioQualityCheckerCreates a new instance of classScenarioQualityChecker.- Parameters:
- scenario- Scenario on which ScenarioQualityChecker will operate.
 
 
- 
- 
Method Details- 
executeActionsExecutes specified actions on a scenario.- Parameters:
- actions- List of actions to be executed. Names of the actions should correspond to names of methods of this class (one exception is action 'simplify[depth]`, where depth is the parameter of method simplify().
- Returns:
- Dictionary mapping names of the actions to their results.
 
- 
countAllStepsComputes the total number of steps within a scenario, including steps that are in all nested scenarios.- Returns:
- The number of all steps in the scenario.
 
- 
countConditionalDecisionsComputes the total number of all conditional decisions in the scenario (composite steps, starting with a keyword).- Returns:
- Number of all conditional decisions in the scenario.
 
- 
getInvalidStepsFinds all steps within a scenario at any level of nesting that do not start with an actor.- Returns:
- A list of all steps found by the method.
 
- 
toTextTransforms the scenario into its textual representation.- Returns:
- String representing the scenario.
 
- 
simplifySimplifies the scenario by restricting it to a certain maximum level of nesting.- Parameters:
- maxDepth- Maximum nesting depth to which the scenario should be restricted.
- Returns:
- Simplified version of the scenario.
 
 
-