//top 10 most current chips public ActionResult TopScores() { UserSqlDal dal = new UserSqlDal(); Dictionary <string, int> TopScores = dal.GetAllUsernamesWithChipsSortedByChipCount(); return(View("TopScores", TopScores)); }
public void TestGetTop10UserNamesWithChipCounts() { UserSqlDal dal = new UserSqlDal(); Dictionary <string, int> output = dal.GetAllUsernamesWithChipsSortedByChipCount(); Assert.AreEqual(3, output.Count); //CollectionAssert.Contains(output, "Boo"); Assert.AreEqual(50000, output["Bob"]); Assert.AreEqual(500, output["Brian"]); CollectionAssert.DoesNotContain(output.Keys, "Boa"); }