Beispiel #1
0
        // snippet: ctor
        public FakeCustomerService(CustomerFaker customerFaker,
                                   IOptions <CustomerServiceOptions> options)
        {
            this.customerFaker = customerFaker;

            customers = customerFaker.Generate(options.Value.Count);
        }
Beispiel #2
0
        // add package Microsoft.Extensions.Options

        //public FakeCustomersService(CustomerFaker customerFaker, IOptions<CustomerOptions> options)
        //{
        //    this.customerFaker = customerFaker;

        //    customers = customerFaker.Generate(options.Value.Qty);
        //}

        public FakeCustomersService(CustomerFaker customerFaker, CustomerOptions options)
        {
            this.customerFaker = customerFaker;

            customers = customerFaker.Generate(options.Qty);
        }