public Update(CustomWebApplicationFactory <Startup> factory, ITestOutputHelper output)
        {
            _factory       = factory;
            factory.Output = output;
            _client        = _factory.CreateClientWithTestAuth();

            _command = new UpdateProductCommand
            {
                Id          = _factory.TestContext.TestProductCommon.Id,
                Name        = "test",
                ProductType = ProductType.Vip,
                Materials   = null
            };
        }
        public Create(CustomWebApplicationFactory <Startup> factory, ITestOutputHelper output)
        {
            _factory       = factory;
            factory.Output = output;
            _client        = _factory.CreateClientWithTestAuth();

            _command = new CreateProductCommand
            {
                Name        = "test",
                ProductType = ProductType.Vip,
                Materials   = new List <MaterialVm>
                {
                    new MaterialVm {
                        Name = "wood", Durability = TimeSpan.FromDays(365 * 4)
                    },
                    new MaterialVm {
                        Name = "iron", Durability = TimeSpan.FromDays(365 * 8)
                    }
                }
            };
        }
Esempio n. 3
0
 public Get(CustomWebApplicationFactory <Startup> factory, ITestOutputHelper output)
 {
     _factory       = factory;
     factory.Output = output;
     _client        = _factory.CreateClientWithTestAuth();
 }