public async void TestgetWeatherByCoord() { var res = await _wModel.GetWeatherByCoord(20, 20); Assert.Equal("", res.Name); Assert.NotEqual("", res.Main.Temp); Assert.NotEmpty(res.Weather); res = await _wModel.GetWeatherByCoord(987198, 8118212112); Assert.Null(res.Name); }
/** * @brief get the wheather from the latitutde and the longitude which are floats * * @return a view */ public async Task <IActionResult> index(float lat, float lon) { var res = await _model.GetWeatherByCoord(lat, lon); return(View(res)); }