void Ex11()
    {
        Fixture.RunThen <ArgumentNullException>(Description, async _ => { await Task.Delay(100); });

        Expect(
            "the underlying stepper should take a Then step that has the specified description and assertion.",
            () => FixtureStepper.Received().Take(Arg.Is <ThenStep>(step =>
                                                                   StepAssertions.ThenStepAsyncExceptionAction.Of(step) == StepAssertions.ThenStepAsyncExceptionAction.Of(Description, typeof(ArgumentNullException))
                                                                   ))
            );
    }
    void Ex01()
    {
        Fixture.RunThen(Description);

        Expect(
            "the underlying stepper should take a Then step that has the specified description.",
            () => FixtureStepper.Received().Take(Arg.Is <ThenStep>(step =>
                                                                   StepAssertions.ThenStep.Of(step) == StepAssertions.ThenStep.Of(Description)
                                                                   ))
            );
    }
    void Ex01()
    {
        Fixture.RunNote(Description);

        Expect(
            "the underlying stepper should take a Note step that has the specified description.",
            () => FixtureStepper.Received().Take(Arg.Is <NoteStep>(step =>
                                                                   step.Description == Description
                                                                   ))
            );
    }
    void Ex10()
    {
        Fixture.RunThen <ArgumentNullException>(Description, _ => true);

        Expect(
            "the underlying stepper should take a Then step that has the specified description and assertion.",
            () => FixtureStepper.Received().Take(Arg.Is <ThenStep>(step =>
                                                                   StepAssertions.ThenStepExceptionAssertion.Of(step) == StepAssertions.ThenStepExceptionAssertion.Of(Description, typeof(ArgumentNullException))
                                                                   ))
            );
    }
    void Ex05()
    {
        Expression <Func <Exception, bool> > assertion = _ => true;

        Fixture.RunThen(Description, assertion);

        Expect(
            "the underlying stepper should take a Then step that has the specified description and assertion.",
            () => FixtureStepper.Received().Take(Arg.Is <ThenStep>(step =>
                                                                   StepAssertions.ThenStep.Of(step) == StepAssertions.ThenStep.Of(Description, assertion)
                                                                   ))
            );
    }
    void Ex07()
    {
        Func <Exception, Task> assertion = async _ => { await Task.Delay(100); };

        Fixture.RunThen(Description, assertion);

        Expect(
            "the underlying stepper should take a Then step that has the specified description and assertion.",
            () => FixtureStepper.Received().Take(Arg.Is <ThenStep>(step =>
                                                                   StepAssertions.ThenStep.Of(step) == StepAssertions.ThenStep.Of(Description, assertion)
                                                                   ))
            );
    }
Exemple #7
0
    void Ex04()
    {
        var asyncAction = async() => { await Task.Delay(100); };

        Fixture.RunExpect(Description, asyncAction);

        Expect(
            "the underlying stepper should take a When step that has the specified description and assertion.",
            () => FixtureStepper.Received().Take(Arg.Is <ExpectStep>(step =>
                                                                     StepAssertions.ExpectStep.Of(step) == StepAssertions.ExpectStep.Of(Description, asyncAction)
                                                                     ))
            );
    }
Exemple #8
0
    void Ex02()
    {
        var assertion = () => { };

        Fixture.RunExpect(Description, assertion);

        Expect(
            "the underlying stepper should take an Expect step that has the specified description and assertion.",
            () => FixtureStepper.Received().Take(Arg.Is <ExpectStep>(step =>
                                                                     StepAssertions.ExpectStep.Of(step) == StepAssertions.ExpectStep.Of(Description, assertion)
                                                                     ))
            );
    }
    void Ex03()
    {
        var asyncArrangement = async() => { await Task.Delay(100); };

        Fixture.RunGiven(Description, asyncArrangement);

        Expect(
            "the underlying stepper should take a Given step that has the specified description and asynchronous arrangement.",
            () => FixtureStepper.Received().Take(Arg.Is <GivenStep>(step =>
                                                                    StepAssertions.GivenStep.Of(step) == StepAssertions.GivenStep.Of(Description, asyncArrangement)
                                                                    ))
            );
    }
    void Ex02()
    {
        var arrangement = () => { };

        Fixture.RunGiven(Description, arrangement);

        Expect(
            "the underlying stepper should take a Given step that has the specified description and arrangement.",
            () => FixtureStepper.Received().Take(Arg.Is <GivenStep>(step =>
                                                                    StepAssertions.GivenStep.Of(step) == StepAssertions.GivenStep.Of(Description, arrangement)
                                                                    ))
            );
    }