public void GroupByCount() { // Same query and results as GroupedMapReduce test var query = testTable.GroupBy(Query.Count(), to => new { name = to.Name }); int count = 0; foreach (var record in connection.Run(query)) { var groupName = record.Item1.name; var reduceCount = record.Item2; switch (groupName) { case "1": case "3": case "6": Assert.That(reduceCount, Is.EqualTo(2)); break; case "2": Assert.That(reduceCount, Is.EqualTo(3)); break; case "4": case "5": case "7": Assert.That(reduceCount, Is.EqualTo(1)); break; } ++count; } Assert.That(count, Is.EqualTo(7)); }