public void DefinedFakeOptionsBuilderCallsBaseMethods( CallsBaseMethods fake, string result) { "Given a fake of a type that has an options builder defined that makes the fake call base methods" .x(() => fake = A.Fake <CallsBaseMethods>()); "When a method is called on the fake" .x(() => result = fake.Name); "Then the base method will have been called" .x(() => result.Should().Be(typeof(CallsBaseMethods).Name)); }
public static void DefinedFakeOptionsBuilderCallsBaseMethods( CallsBaseMethods fake, string result) { "Given a type that has an implicit options builder defined" .See <CallsBaseMethods>(); "And the options builder updates the options to call base methods" .See <CallsBaseMethodsOptionsBuilder>(_ => _.BuildOptions); "When I create a fake of the type" .x(() => fake = A.Fake <CallsBaseMethods>()); "And I call a method on the fake" .x(() => result = fake.Name); "Then the base method is called" .x(() => result.Should().Be(typeof(CallsBaseMethods).Name)); }