public void It_should_sum_the_values_in_the_specified_column() { _DataTable.Rows.Add("Price", 22.75); _DataTable.Rows.Add("Price", 18.25); _DataTable.Rows.Add("Price", 3); _DataTable.Rows.Add("Tax", 15); _DataTable.Rows.Add("Delivery", 5); var groupTotals = _DataTable.GroupBy("A1:A?").Sum <decimal>(1); CollectionAssert.AreEquivalent(new [] {
public void It_should_find_the_max_value_in_the_specified_column() { var dataRows = new[] { _DataTable.LoadDataRow(new object[] { "Price", 18.25 }, true), _DataTable.LoadDataRow(new object[] { "Price", 22.75 }, true), _DataTable.LoadDataRow(new object[] { "Price", 3 }, true), _DataTable.LoadDataRow(new object[] { "Tax", 15 }, true), _DataTable.LoadDataRow(new object[] { "Delivery", 5 }, true), _DataTable.LoadDataRow(new object[] { "Delivery", 7.5 }, true) }; var maxPerGroup = _DataTable.GroupBy("A1:A?").Max <decimal>(1); CollectionAssert.AreEquivalent(new [] {