Ejemplo n.º 1
0
        public void CodesTest()
        {
            WeatherCodes.Init();

            var icon = WeatherCodes.Instance.GetWeatherIcon(800);

            Assert.AreEqual("http://openweathermap.org/img/w/01d.png", icon);
        }
Ejemplo n.º 2
0
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
            using (var client = new NewsContext())
            {
                client.Database.EnsureDeleted();
                client.Database.EnsureCreated();

                NewsController.SeedTheCategories();

                // NewsController.SeedTheAuthors();
            }

            WeatherCodes.Init(); //Initializing the weathercodes dictionary.
        }