public async Task Setup() { _request = new CalculateTrolleyRequest { Products = new List <Product> { new Product { Name = "Item1", Price = 4 }, new Product { Name = "Item2", Price = 2 } }, Quantities = new List <Product> { new Product { Name = "Item1", Quantity = 2 }, new Product { Name = "Item2", Quantity = 2 } } }; var handler = new CalculateTrolleyRequestHandler(); calculateResponse = await handler.Handle(_request, CancellationToken.None); }
public async Task Setup() { _request = new CalculateTrolleyRequest { Products = new List <Product> { new Product { Name = "Item1", Price = 5 } }, Quantities = new List <Product> { new Product { Name = "Item1", Quantity = 1 } }, Specials = new List <Special> { new Special { Quantities = new List <Product> { new Product { Name = "Item1", Quantity = 10 } }, Total = 60 } } }; var handler = new CalculateTrolleyRequestHandler(); calculateResponse = await handler.Handle(_request, CancellationToken.None); }