public Run ( System.Action specifyExpectations, IExampleReporter exampleReporter ) : |
||
specifyExpectations | System.Action | |
exampleReporter | IExampleReporter | |
return |
public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
{
var example = new Example();
spec.SetUpAction = () => spec.Example = example;
spec.TearDownAction = () => example.Run(exampleReporter);
specifyExpectations();
return example;
}
internal static Example Execute(this Spec spec, Action specifyExpectations) { using (var runner = new Runner(spec)) return runner.Run(() => { spec.SetUp(); specifyExpectations(); spec.TearDown(); }, Substitute.For<IExampleReporter>()); }