示例#1
0
        public void ProvidesPartsOfBuiltin()
        {
            using (var fake = new AutoSubstitute())
            {
                var bar = fake.ProvidePartsOf <IBar, Bar>();
                bar.When(x => x.Fuzz()).DoNotCallBase();
                bar.Fuzz().Returns("Fuzz");

                var foo    = fake.Resolve <Foo>();
                var result = foo.Fuzz();

                Assert.Equal("Fuzz", result);
            }
        }