コード例 #1
0
        public async Task GetCountryCities()
        {
            //action
            WeatherController controller = new WeatherController();
            JsonResult        result     = await controller.GetCountryCities("Australia") as JsonResult;

            //convert data result
            var data = (IEnumerable <iAsset.WeatherViewer.DataModel.City>)result.Data;

            //check if the first data in Model list is Adelaide Airport
            Assert.AreEqual("Adelaide Airport", data.First().CityName);
        }