public void WhenCreatedWithEmptyInputThenEmptyPriceListIsCreated() { var priceListFactory = new SkuPriceListFactory(new SkuOption[0]); var priceList = priceListFactory.Create(); Assert.Empty(priceList); }
public void CreatePriceList(string id, string name, decimal unitPrice) { var priceListFactory = new SkuPriceListFactory(new[] { new SkuOption() { Id = id, Name = name, UnitPrice = unitPrice } }); var priceList = priceListFactory.Create(); Assert.NotEmpty(priceList); Assert.Equal(1, priceList.Count); Assert.Equal(1, priceList.Keys.Count(sku => sku.Id == id)); Assert.Equal(unitPrice, priceList.First(pair => pair.Key.Id == id).Value); }