예제 #1
0
파일: ExampleSpec.cs 프로젝트: nspec/NSpec
        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>();
        }
예제 #2
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;
        }
예제 #3
0
        public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
        {
            var example = new Example();
            spec.Example = example;

            specifyExpectations();
            example.Run(exampleReporter);

            return example;
        }
예제 #4
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>();
        }
예제 #5
0
        public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
        {
            var example = new Example();

            spec.SetUpAction    = () => spec.Example = example;
            spec.TearDownAction = () => example.Run(exampleReporter);

            specifyExpectations();

            return(example);
        }
예제 #6
0
        public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
        {
            var example = new Example();

            spec.Example = example;

            specifyExpectations();
            example.Run(exampleReporter);

            return(example);
        }
예제 #7
0
 void Run(IExpectation expectation, IExampleReporter reporter)
 {
     expectation.Run();
     reporter.ReportExpectation(expectation);
 }
예제 #8
0
 public void Run(IExampleReporter reporter)
 {
     expectations.ForEach(e => Run(e, reporter));
 }
예제 #9
0
파일: Example.cs 프로젝트: nspec/NSpec
 void Run(IExpectation expectation, IExampleReporter reporter)
 {
     expectation.Run();
     reporter.ReportExpectation(expectation);
 }
예제 #10
0
파일: Example.cs 프로젝트: nspec/NSpec
 public void Run(IExampleReporter reporter)
 {
     expectations.ForEach(e => Run(e, reporter));
 }