public void TestParametersContainer_GetENodebsByDistrict_City1()
        {
            Dictionary <string, int> stat = container.GetENodebsByDistrict("City1");

            Assert.AreEqual(stat.Count(), 2);
            Assert.AreEqual(stat["District1"], 4);
            Assert.AreEqual(stat["District2"], 2);
        }
示例#2
0
        public JsonResult GetDistrictENodebsStat(ParametersContainer container, string cityName)
        {
            if (container.TownENodebStats == null)
            {
                container.ImportTownENodebStats(_townRepository, _eNodebRepository, _regionRepository);
            }

            return(Json(container.GetENodebsByDistrict(cityName).Select(
                            x => new { D = x.Key, N = x.Value }), JsonRequestBehavior.AllowGet));
        }