Exemplo n.º 1
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>();
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
        public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
        {
            var example = new Example();
            spec.Example = example;

            specifyExpectations();
            example.Run(exampleReporter);

            return example;
        }
Exemplo n.º 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>();
        }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
        public Example Run(Action specifyExpectations, IExampleReporter exampleReporter)
        {
            var example = new Example();

            spec.Example = example;

            specifyExpectations();
            example.Run(exampleReporter);

            return(example);
        }
Exemplo n.º 7
0
 void Run(IExpectation expectation, IExampleReporter reporter)
 {
     expectation.Run();
     reporter.ReportExpectation(expectation);
 }
Exemplo n.º 8
0
 public void Run(IExampleReporter reporter)
 {
     expectations.ForEach(e => Run(e, reporter));
 }
Exemplo n.º 9
0
 void Run(IExpectation expectation, IExampleReporter reporter)
 {
     expectation.Run();
     reporter.ReportExpectation(expectation);
 }
Exemplo n.º 10
0
 public void Run(IExampleReporter reporter)
 {
     expectations.ForEach(e => Run(e, reporter));
 }