コード例 #1
0
        public void NumWeatherTest()
        {
            _db = new ParkGeekDAO("Data Source=localhost\\sqlexpress;Initial Catalog=NPGeekTest;Integrated Security=True");
            var numWeather = _db.GetFiveDayWeather("CVNP");

            Assert.AreEqual(5, numWeather.Count);
        }
コード例 #2
0
        public IActionResult Detail(string parkCode)
        {
            ParkViewModel vm = new ParkViewModel();

            vm.Park            = _db.GetPark(parkCode);
            vm.FiveDayForeCast = _db.GetFiveDayWeather(parkCode);
            return(GetAuthenticatedView("Detail", vm));
        }
コード例 #3
0
        public void GetWeatherTest()
        {
            _db = new ParkGeekDAO("Data Source=localhost\\sqlexpress;Initial Catalog=NPGeekTest;Integrated Security=True");
            var weather = _db.GetFiveDayWeather("CVNP");

            Assert.AreEqual(38, weather[0].LowTemp);
            Assert.AreEqual(62, weather[0].HighTemp);
            Assert.AreEqual("rain", weather[0].Forecast);
        }