Ejemplo n.º 1
0
        public void WeatherServiceGetLocationTest()
        {
            var webService = new Domain.WebServices.Fakes.StubIWeatherWebService
            {
                GetLocationString = s => new Location
                {
                    Latitude = 11.1f,
                    Longitude = 22.2f,
                    LocationId = 1,
                    LocationText = "Göteborg",
                    PlaceCode = "abc"
                }
            };

            var repo = new Domain.Repositories.Fakes.StubIWeatherRepository();

            var w = new WeatherService(repo, webService);

            var actual = w.GetLocation("Göteborg");

            Assert.AreEqual(actual.LocationText, "Göteborg");
        }