public override void BuildOptions(Type typeOfFake, IFakeOptions options) { if (options != null) { options.Strict(); } }
private void ApplyOptions <T>(IFakeOptions <T> options) { if (this._strict) { options.Strict(); } if (this._configureFake != null) { options.ConfigureFake(x => this._configureFake(x)); } }
private void ApplyOptions <T>(IFakeOptions <T> options)//IFakeOptionsBuilder<T> [to] IFakeOptions<T> { if (this._strict) { options.Strict(); } if (this._onFakeCreated != null) { options.ConfigureFake(x => this._onFakeCreated(x));//OnFakeCreated(x=>) [to] ConfigureFake(x=>) } }
private void ApplyOptions(IFakeOptions options) { if (this._strict) { options = options.Strict(); } if (this._configureFake != null) { options = options.ConfigureFake(x => this._configureFake(x)); } if (this._callsBaseMethods) { options.CallsBaseMethods(); } }
public void BuildOptions(Type typeOfFake, IFakeOptions options) { options.Strict(); }
/// <summary> /// Makes the fake strict. This means that any call to the fake /// that has not been explicitly configured will throw an exception. /// </summary> /// <param name="options">Options used to create the fake object.</param> /// <returns>An options object.</returns> public static IFakeOptions Strict(this IFakeOptions options) { return(options.Strict(StrictFakeOptions.None)); }
/// <summary> /// Makes the fake strict. This means that any call to the fake /// that has not been explicitly configured will throw an exception. /// </summary> /// <typeparam name="T">The type of fake object.</typeparam> /// <param name="options">Options used to create the fake object.</param> /// <returns>An options object.</returns> public static IFakeOptions <T> Strict <T>(this IFakeOptions <T> options) where T : class { return(options.Strict(StrictFakeOptions.None)); }