I’m trying to pass “TestGetsTopTwenty()” test.
I have this code:
result = await _commentsCollection
.WithReadConcern(ReadConcern.Majority)
.Aggregate()
.Group(c => c.Email, g => new { Id = g.Key, Count = g.Count() })
.SortByDescending(g => g.Count)
.Limit(20)
.Project(rp => new ReportProjection { Id = rp.Id, Count = rp.Count })
.ToListAsync();
I get 277 instead of 331 for “Assert.AreEqual(331, result.Report.First().Count);” assertion.
Can you help me?