Beispiel #1
0
 /// <summary>
 /// Adds the specified composer transformation function as an AutoFixture customization.
 /// </summary>
 /// <typeparam name="TModel">The type of the model.</typeparam>
 /// <param name="fixture">The fixture.</param>
 /// <param name="composer">The composer.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture HavingAutoFixtureCustomization <TModel>(
     this IMvcFunctionalTestFixture fixture,
     Func <Faker, ICustomizationComposer <TModel>, ISpecimenBuilder> composer) =>
 fixture.HavingAutoFixture(f => f.Customize <TModel>(c => composer(fixture.Faker, c)));
Beispiel #2
0
 /// <summary>
 /// Adds the specified composer transformation function as an AutoFixture customization.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <param name="specimenBuilder">The specimen builder.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture HavingAutoFixtureCustomization(
     this IMvcFunctionalTestFixture fixture,
     ISpecimenBuilder specimenBuilder) =>
 fixture.HavingAutoFixture(f => f.Customizations.Add(specimenBuilder));
Beispiel #3
0
 /// <summary>
 /// Adds the specified behavior to the auto fixture instance.
 /// </summary>
 /// <param name="fixture">The fixture.</param>
 /// <param name="behavior">The behavior.</param>
 /// <returns></returns>
 public static IMvcFunctionalTestFixture HavingAutoFixtureBehavior(
     this IMvcFunctionalTestFixture fixture,
     ISpecimenBuilderTransformation behavior) =>
 fixture.HavingAutoFixture(f => f.Behaviors.Add(behavior));