User Report Ticket, CommentRepsitoryTest --> TestsGetsTopTwent Unittest


I think this unit test is wrong. Can you check please?

Assert.AreEqual(277, result.Report.First().Count);
Assert.AreEqual(292, result.Report.Last().Count);

When i aggregate comments collection in the mongodb compass my first item(item is users email) count ise 277 and last item is 242. The first item is matching but last item is not. By the way we are sorting comment by descending. In that situation t should not be possible that last item count is greater than the first item. That’s why, i think the unit test should be belown.

Assert.AreEqual(242, result.Report.Last().Count);

Best regards…