@Override protected boolean execute(BasicScenarioNode node, RootNodeExecutionContext context) { log.info("Executing scenario {}", node.getDescription()); this.context = context; boolean success = runBackgroundIfPresent(node, context); Iterator<StepNode> stepIt = node.getSteps().iterator(); while (success && stepIt.hasNext()) { StepNode step = stepIt.next(); success &= step.dispatch(this); } return success; }
@Override public <RETURN_TYPE> List<RETURN_TYPE> accept(ExecutionNodeVisitor<RETURN_TYPE> executionNodeVisitor) { List<RETURN_TYPE> toReturn = Lists.newArrayList(); toReturn.add(executionNodeVisitor.visit(this)); for (StepNode stepNode : getChildren()) { toReturn.addAll(stepNode.accept(executionNodeVisitor)); } return toReturn; }
@Override protected boolean execute(BasicScenarioNode node, RootNodeExecutionContext context) { log.info("Executing scenario {}", node.getDescription()); this.context = context; boolean success = runBackgroundIfPresent(node, context); Iterator<StepNode> stepIt = node.getSteps().iterator(); while (success && stepIt.hasNext()) { StepNode step = stepIt.next(); success &= step.dispatch(this); } return success; }
@Override public <RETURN_TYPE> List<RETURN_TYPE> accept(final ExecutionNodeVisitor<RETURN_TYPE> executionNodeVisitor) { final List<RETURN_TYPE> results = Lists.newArrayList(); results.add(executionNodeVisitor.visit(this)); if (this.background != null) { results.addAll(this.background.accept(executionNodeVisitor)); } for (final StepNode step : getChildren()) { results.addAll(step.accept(executionNodeVisitor)); } return results; }
@Override protected boolean execute(SubstepNode node, RootNodeExecutionContext context) { log.debug("Executing substep {}", node.getDescription()); boolean success = addExpectedChildrenFailureIfNoChildren(node, node.getChildren(), context); this.context = context; Iterator<StepNode> substepsIt = node.getChildren().iterator(); while (success && substepsIt.hasNext()) { success = substepsIt.next().dispatch(this); } return success; }
@Override protected boolean execute(SubstepNode node, RootNodeExecutionContext context) { log.debug("Executing substep {}", node.getDescription()); boolean success = addExpectedChildrenFailureIfNoChildren(node, node.getChildren(), context); this.context = context; Iterator<StepNode> substepsIt = node.getChildren().iterator(); while (success && substepsIt.hasNext()) { success = substepsIt.next().dispatch(this); } return success; }