public void GetCountry_Returns_SameCountryAndCities()
        {
            // Arrange
            var mockRepository = new Mock <IWeatherRepository>();

            mockRepository.Setup(x => x.GetCountry("Australia"))
            .Returns(new Country
            {
                Name   = "Australia",
                Cities = new List <City>
                {
                    new City
                    {
                        Name = "Sydney"
                    }
                }
            });

            var controller = new WeatherController(mockRepository.Object);

            // Act
            IHttpActionResult actionResult = controller.GetCountry("Australia");
            var contentResult = actionResult as OkNegotiatedContentResult <Country>;

            // Assert
            Assert.IsNotNull(contentResult);
            Assert.IsNotNull(contentResult.Content);
            Assert.AreEqual("Australia", contentResult.Content.Name);
            Assert.AreEqual("Sydney", contentResult.Content.Cities[0].Name);
        }
        public void GetCountry_Returns_NotFound()
        {
            // Arrange
            var mockRepository = new Mock <IWeatherRepository>();

            var controller = new WeatherController(mockRepository.Object);

            // Act
            IHttpActionResult actionResult = controller.GetCountry("Moon");

            // Assert
            Assert.IsInstanceOfType(actionResult, typeof(NotFoundResult));
        }