public void AggregatorAvgEmpty() { var a = Price.Avg(); }
public void AggregatorAvg() { // do not use Assert.AreEqual to test if Prices are equal Assert.IsTrue(new Price(2, 25, CurrencyUnit.EUR) == Price.Avg(p23, p22, p22, p23)); }
/// <summary>Yields a price with averages of price amounts and a weigted average VAT rate</summary> /// <exception cref = "PriceException">Thrown when currency units are not compatible</exception> public static Price Avg(this PriceList prices) => Price.Avg(prices.ToArray());