示例#1
0
文件: Runner.cs 项目: nspec/NSpec
        public Runner(Spec spec)
        {
            this.spec = spec;

            preExistingExample = spec.Example;
            preExistingSetUpAction = spec.SetUpAction;
            preExistingTearDownAction = spec.TearDownAction;
        }
示例#2
0
        public void setup()
        {
            example = new Example();

            failingExpectation = CreateSubstituteExpectation(e => e.IsFail.Returns(true));
            passingExpectation = CreateSubstituteExpectation(e => e.IsPass.Returns(true));
            pendingExpectation = CreateSubstituteExpectation(e => e.IsPending.Returns(true));

            exampleReporter = Substitute.For<IExampleReporter>();
        }
示例#3
0
        public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
        {
            var example = new Example();
            spec.Example = example;

            specifyExpectations();
            example.Run(exampleReporter);

            return example;
        }
示例#4
0
文件: Runner.cs 项目: nspec/NSpec
        public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
        {
            var example = new Example();
            spec.SetUpAction = () => spec.Example = example;
            spec.TearDownAction = () => example.Run(exampleReporter);

            specifyExpectations();

            return example;
        }
示例#5
0
 public Runner(Spec spec)
 {
     this.spec = spec;
     preExistingExample = spec.Example;
 }