public void TestGetCities_It_Shoud_Throw_Argument_Exception_If_Parameter_Country_IsNull_Or_Empty() { //Setup WebServicexGlobalWeatherProvider _provider = new WebServicexGlobalWeatherProvider(); //Act var result = _provider.GetCities(""); }
public void TestGetWeather_It_Shoud_Throw_Exception_If_Country_Is_Unknown() { //Setup WebServicexGlobalWeatherProvider _provider = new WebServicexGlobalWeatherProvider(); City city = new City { Country = "Unknown", Name = "Sydney" }; //Act var result = _provider.GetWeather(city); }
public void TestGetCities_It_Shoud_Return_Empty_List_If_We_Pass_Invalid_CountryName() { //Setup WebServicexGlobalWeatherProvider _provider = new WebServicexGlobalWeatherProvider(); //Act var result = _provider.GetCities("Unknown Country"); //Assert Assert.AreEqual(0, result.Count); }
public void TestGetCities_It_Should_Return_List_Of_Cities_Correspondng_To_Country() { //Setup WebServicexGlobalWeatherProvider _provider = new WebServicexGlobalWeatherProvider(); //Act var result = _provider.GetCities("Australia"); //Assert Assert.IsNotNull(result); Assert.AreNotEqual(result.Count, 0); }
public void TestGetCities_it_should_return_list_of_all_countries() { //Setup WebServicexGlobalWeatherProvider _provider = new WebServicexGlobalWeatherProvider(); //Act var result = _provider.GetCountries(); //Assert Assert.IsNotNull(result); Assert.AreNotEqual(result.Count, 0); }
public void TestGetWeather_It_Shoud_Return_Weather_Parameters() { //Setup WebServicexGlobalWeatherProvider _provider = new WebServicexGlobalWeatherProvider(); City city = new City { Country = "Australia", Name = "Sydney" }; //Act var result = _provider.GetWeather(city); //Assert Assert.AreNotEqual(null, result); }