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

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

            Assert.AreEqual("http://openweathermap.org/img/w/01d.png", icon);
        }
Esempio 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.
        }