コード例 #1
0
        public async Task GetAllWeatherReadingsOnDate()
        {
            var reading = new WeatherReading
            {
                Date         = DateTime.Now,
                TemperatureC = 10,
                Humidity     = 100,
                AirPressure  = 1000,
                Place        = new Place {
                    Lat = 58, Long = 10, Name = "Aarhus"
                }
            };

            DbContext.WeatherReading.Add(reading);
            DbContext.SaveChanges();

            var result = await uut.WeatherReadingByDate(DateTime.Now.Date);

            Assert.IsInstanceOf <IEnumerable <WeatherReadingDto> >(result);
        }