public void Parsing()
 {
     var weather = new OpenWeatherConnection();
     var s = TemplateJSON.ParseAPIData("main", "temp_max", "\":","0123456789.");
     var result = double.Parse(s, CultureInfo.InvariantCulture);
     Assert.AreEqual(286.48,result);
 }
        public void GetWeatherAgainTest()
        {
            var weather = new OpenWeatherConnection();
            weather.City = "Krosno";
            IWeatherData data = weather.GetWeatherData();

            Assert.AreNotEqual(data, WeatherData.ERRORMODEL);
        }
        public void TestMultiHours()
        {
            OpenWeatherConnection weather = new OpenWeatherConnection();
            weather.City = "Warsaw";
            IDateWeatherData data = weather.GetDateWeatherData();

            Assert.IsNotNull(data.DateTimes);
            Assert.IsNotNull(data.WeatherDatas);
            Assert.AreEqual(data.DateTimes.Count,data.WeatherDatas.Count);
        }
        public void GetWeatherDataTest()
        {
            var weather = new OpenWeatherConnection();
            weather.City="Krosno";
            IWeatherData data = weather.GetWeatherData();

            Assert.AreNotEqual(data,WeatherData.ERRORMODEL);
            Assert.IsNotNull(data.MainInformation);
            Assert.IsNotNull(data.Description);
            Assert.IsNotNull(data.KelvinTemperature);
            Assert.IsNotNull(data.Humidity) ;
            Assert.IsNotNull(data.WindDegree);
            Assert.IsNotNull(data.WindSpeed);
        }
 public void SetNewWeatherTargetTestCityName()
 {
     IWeatherConnection weatherConnection = new OpenWeatherConnection();
     weatherConnection.City = "Krosno";
     Assert.AreEqual(weatherConnection.City, "Krosno");
 }