public void run() { command.execute(commandCall, evaluator, resultRecorder, fixture); } });
public void run() { command.execute(commandCall, evaluator, resultRecorder, fixture); } });
public void execute(Evaluator evaluator, ResultRecorder resultRecorder, Fixture fixture) { for (Map.Entry<String, Object> entry: constantsForExecution.entrySet()) { evaluator.setVariable(entry.getKey(), entry.getValue()); } command.execute(this, evaluator, resultRecorder, fixture); }
public void execute(Evaluator evaluator, ResultRecorder resultRecorder, Fixture fixture) { for (Map.Entry<String, Object> entry: constantsForExecution.entrySet()) { evaluator.setVariable(entry.getKey(), entry.getValue()); } command.execute(this, evaluator, resultRecorder, fixture); }
public void processNode(CommandCall node, Evaluator evaluator, ResultRecorder resultRecorder, Fixture fixture) { if (!node.getChildren().isEmpty()) { for (CommandCall before: beforeExamples) { SummarizingResultRecorder beforeResultRecorder = new SummarizingResultRecorder(); beforeResultRecorder.setSpecificationDescription("Running before for example " + node.getExpression()); before.getCommand().execute(before, evaluator, beforeResultRecorder, fixture); String errorText = null; if (beforeResultRecorder.hasExceptions()) { errorText = SimpleFormatter.format("Exceptions occurred in the 'before' example in '%s'. See the output specification for details.\n", specificationDescription ); } else if (beforeResultRecorder.getTotalCount() > 0) { errorText = SimpleFormatter.format("Assertions were made in the 'before' example in '%s'.\n" + "Assertions are not supported in the 'before' example.\n", specificationDescription ); } if (errorText != null) { System.err.println(errorText); throw new ConcordionAssertionError(errorText, beforeResultRecorder); } } } node.execute(evaluator, resultRecorder, fixture); }
public void processNode(CommandCall node, Evaluator evaluator, ResultRecorder resultRecorder, Fixture fixture) { if (!node.getChildren().isEmpty()) { for (CommandCall before: beforeExamples) { SummarizingResultRecorder beforeResultRecorder = new SummarizingResultRecorder(); beforeResultRecorder.setSpecificationDescription("Running before for example " + node.getExpression()); before.getCommand().execute(before, evaluator, beforeResultRecorder, fixture); String errorText = null; if (beforeResultRecorder.hasExceptions()) { errorText = SimpleFormatter.format("Exceptions occurred in the 'before' example in '%s'. See the output specification for details.\n", specificationDescription ); } else if (beforeResultRecorder.getTotalCount() > 0) { errorText = SimpleFormatter.format("Assertions were made in the 'before' example in '%s'.\n" + "Assertions are not supported in the 'before' example.\n", specificationDescription ); } if (errorText != null) { System.err.println(errorText); throw new ConcordionAssertionError(errorText, beforeResultRecorder); } } } node.execute(evaluator, resultRecorder, fixture); }