Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace AutoFixture
- {
- using Dsl;
- using System;
- using System.Linq.Expressions;
- using Bogus;
- public static class Extensions
- {
- public static Faker faker = new Faker();
- public static IPostprocessComposer<T> With<T, TProperty>(
- this ICustomizationComposer<T> @this,
- Expression<Func<T, TProperty>> propertyPicker,
- Func<Faker, TProperty> valueFactory) =>
- @this.With(propertyPicker, () => valueFactory(faker));
- public static IPostprocessComposer<T> With<T, TProperty>(
- this IPostprocessComposer<T> @this,
- Expression<Func<T, TProperty>> propertyPicker,
- Func<Faker, TProperty> valueFactory) =>
- @this.With(propertyPicker, () => valueFactory(faker));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement