Esempio n. 1
0
        public void Test_GetByTownNames(int townId, int count)
        {
            _btsRepository.MockThreeBtss();
            _btsRepository.MockOperation();
            var btsList = _service.GetByTownNames("city-" + townId, "district-" + townId, "town-" + townId) ?? new List <CdmaBtsView>();

            Assert.AreEqual(btsList.Count(), count);
        }
Esempio n. 2
0
 public IEnumerable <CdmaBtsView> Get(string city, string district, string town)
 {
     return(_service.GetByTownNames(city, district, town));
 }
Esempio n. 3
0
        public IHttpActionResult Get(string city, string district, string town)
        {
            var result = _service.GetByTownNames(city, district, town);

            return(result == null ? (IHttpActionResult)BadRequest("This town has no btss!") : Ok(result));
        }