Agathas.Storefront.Specs.Uat.Steps.BasketStepDefinitions.GivenTheFollowingProducts C# (CSharp) Method

GivenTheFollowingProducts() private method

private GivenTheFollowingProducts ( TechTalk.SpecFlow.Table table ) : void
table TechTalk.SpecFlow.Table
return void
        public void GivenTheFollowingProducts(Table table)
        {
            foreach (var row in table.Rows)
            {
                _productRepository.add(new ProductSnapshot(int.Parse(row["ProductId"]), row["Name"], new Money(decimal.Parse(row["Price"])), row["Category"]));
            }

            _uow.Commit();
        }