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

GivenTheFollowingOffer() private method

private GivenTheFollowingOffer ( TechTalk.SpecFlow.Table table ) : void
table TechTalk.SpecFlow.Table
return void
        public void GivenTheFollowingOffer(Table table)
        {
            foreach (var row in table.Rows)
            {
                _promotions_repository.add(new Promotion(row["VoucherCode"], new Money(decimal.Parse(row["Discount"])), new Money(decimal.Parse(row["Threshold"]))));
            }

            _uow.Commit();
        }