public void rows_less_than_0_throw_argumentException() { //arrange var target = new AggregateGoods(); var goods = GetGoods(); //act Action actual = () => target.Sum(goods, 0, "Revenue"); //assert actual.ShouldThrow <ArgumentException>(); }
public void rows_4_column_revenue_sum_should_be_50_66_60() { //arrange var target = new AggregateGoods(); var goods = GetGoods(); var excepted = new List <int> { 50, 66, 60 }; //act var actual = target.Sum(goods, 4, "Revenue"); //assert Assert.AreEqual(excepted, actual); }
public void rows_3_column_cost_sum_should_be_6_15_24_21() { //arrange var target = new AggregateGoods(); var goods = GetGoods(); var excepted = new List <int> { 6, 15, 24, 21 }; //act var actual = target.Sum(goods, 3, "Code"); //assert Assert.AreEqual(excepted, actual); }