Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                var config = new FakerConfig();
                config.Add <Person, string, AlwaysOneValueGenerator>(foo => foo.Name);
                var faker  = new Faker(config);
                var result = faker.Create <Person>();
            }
            catch (ArgumentException)
            {
                Console.WriteLine("Failed to create dto.");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public CustomValueProvider(FakerConfig config)
 {
     Config = config;
 }
Ejemplo n.º 3
0
 public Faker(FakerConfig config)
 {
     customValueProvider = new CustomValueProvider(config);
 }