public void GivenTheFollowingNewCustomerOrders(Table table) { var orders = new List <ClientEntities.Order>(); foreach (var row in table.Rows) { string custId = row["CustomerId"]; int[] productIds = TestsHelper.CreateTestProducts(); ScenarioContext.Current.Add("ProductIds", productIds); var clientOrder = EntityExtensions.CreateNewOrder(custId, productIds); orders.Add(clientOrder); } ScenarioContext.Current.Add("NewCustOrders", orders); }
public void GivenTheFollowingExistingCustomerOrders(Table table) { var orders = new List <ClientEntities.Order>(); foreach (var row in table.Rows) { string custId = row["CustomerId"]; TestsHelper.EnsureTestCustomer(custId, "Test Customer " + custId); int[] productIds = TestsHelper.CreateTestProducts(); ScenarioContext.Current.Add("ProductIds", productIds); var order = TestsHelper.CreateTestOrder(custId, productIds); orders.Add(order.ToClientEntity()); } ScenarioContext.Current.Add("ExistingCustOrders", orders); }