Exemple #1
0
 public override void BuildOptions(Type typeOfFake, IFakeOptions options)
 {
     if (options != null)
     {
         options.Strict();
     }
 }
Exemple #2
0
        private void ApplyOptions <T>(IFakeOptions <T> options)
        {
            if (this._strict)
            {
                options.Strict();
            }

            if (this._configureFake != null)
            {
                options.ConfigureFake(x => this._configureFake(x));
            }
        }
Exemple #3
0
        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=>)
            }
        }
Exemple #4
0
        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();
 }
Exemple #6
0
 /// <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));
 }
Exemple #7
0
 /// <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));
 }