Beispiel #1
0
        protected override void OnSetUp()
        {
            this.fakeAssertions        = A.Fake <IFakeAssertions <IFoo> >();
            this.fakeAssertionsFactory = A.Fake <IFakeAssertionsFactory>();
            A.CallTo(() => this.fakeAssertionsFactory.CreateAsserter <IFoo>(A <FakeObject> .Ignored))
            .Returns(this.fakeAssertions);

            this.fakeConfiguration        = A.Fake <IStartConfiguration <IFoo> >();
            this.fakeConfigurationFactory = A.Fake <IStartConfigurationFactory>();
            A.CallTo(() => this.fakeConfigurationFactory.CreateConfiguration <IFoo>(A <FakeObject> .Ignored))
            .Returns(this.fakeConfiguration);
        }
        protected override void OnSetUp()
        {
            this.fakeAssertions        = A.Fake <IFakeAssertions <IFoo> >();
            this.fakeAssertionsFactory = A.Fake <IFakeAssertionsFactory>();
            Fake.Configure(this.fakeAssertionsFactory)
            .CallsTo(x => x.CreateAsserter <IFoo>(Argument.Is.Any <FakeObject>()))
            .Returns(this.fakeAssertions);

            this.fakeConfiguration        = A.Fake <IFakeConfiguration <IFoo> >();
            this.fakeConfigurationFactory = A.Fake <IFakeConfigurationFactory>();
            Fake.Configure(this.fakeConfigurationFactory)
            .CallsTo(x => x.Create <IFoo>(Argument.Is.Any <FakeObject>()))
            .Returns(this.fakeConfiguration);
        }