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); }