public void It_should_expose_the_key_through_the_key_property() { const string key = "key"; var grouping = new DataRowGrouping(key, Enumerable.Empty <DataRow>()); Assert.AreEqual(key, grouping.Key); }
public void It_should_expose_the_data_rows_through_the_enumerator() { var table = new System.Data.DataTable(); var dataRow = table.NewRow(); table.Rows.Add(dataRow); var grouping = new DataRowGrouping("key", table.Rows.OfType <DataRow>()); Assert.AreEqual(dataRow, grouping.Single()); }