public void GetHiddenCachesCountPerUserTest() { DataFilter filter = filterManager.GetDefaultFilter(); filter.Limit = 5; filter.FromDate = new DateTime(2005, 01, 20); filter.ToDate = new DateTime(2020, 01, 20); var expected = new List <StatisticData> { new StatisticData { Name = "Heinz170", Value = "12" }, new StatisticData { Name = "Christiane205", Value = "11" }, new StatisticData { Name = "Georg932", Value = "10" }, new StatisticData { Name = "Herman117", Value = "10" }, new StatisticData { Name = "Andreas872", Value = "9" }, }; IList <StatisticData> actual = target.GetHiddenCachesCountPerUser(filter); Assert.AreEqual(expected.Count, actual.Count); foreach (StatisticData data in expected) { Assert.IsTrue(actual.Contains(data)); } }
public StatisticDataset GetUsersByHiddenCaches(DataFilter filter) { filterManager.ValidateFilter(filter); var data = new StatisticDataset { Data = cacheDao.GetHiddenCachesCountPerUser(filter), Caption = "Users ordered by number of hidden caches", Column2Caption = "Username", Column3Caption = "Hidden caches" }; return(data); }