internal static void SetLastCallBehavior_RequiresPreviousCall(Behavior behavior) { Tools.Asserter.Throws <InvalidOperationException>(() => { FakeMetaProvider.SetLastCallBehavior(behavior); FakeMetaProvider.SetLastCallBehavior(behavior); }); }
/// <summary>Ties a method call to <paramref name="behavior"/>.</summary> /// <param name="fakeCallResult">Result from the fake method to setup.</param> /// <param name="behavior">Behavior to set the call behavior with.</param> /// <remarks>For use on <see cref="IFaked"/> stubs from the <see cref="Faker"/> tool only.</remarks> public static void SetupCall <T>(this T fakeCallResult, Behavior <T> behavior) { FakeMetaProvider.SetLastCallBehavior(behavior); }