예제 #1
0
            public override void ConfigureServices(IServiceCollection services)
            {
                var svcFake = new CustomerServiceFake();

                svcFake.AllCustomers.Add(new Customer
                {
                    AccountNumber = 1,
                    FirstName     = "Oskar",
                    LastName      = "Gewalli"
                });
                this.svc = svcFake;
            }
        public override void ConfigureServices(IServiceCollection services)
        {
            base.ConfigureServices(services);
            var svcFake = new CustomerServiceFake();

            svcFake.AllCustomers.Add(new Customer
            {
                AccountNumber = 1,
                FirstName     = "Oskar",
                LastName      = "Gewalli"
            });
            services.AddSingleton <ICustomerService>(svcFake);
        }
예제 #3
0
 public ContractTests()
 {
     svc          = new CustomerServiceFake();
     bootstrapper = new TestBootstrapper(svc);
     browser      = new Browser(bootstrapper, defaults: to => to.Accept("application/xml"));
 }