示例#1
0
        public async Task UpdateTest()
        {
            var raceData = (await RaceDataDao.FindAllAsync()).First();

            raceData.EventTypeId = (int)Domain.Enums.RaceDataEvent.RaceCanceled;
            await RaceDataDao.UpdateAsync(raceData);

            Assert.AreEqual((int)Domain.Enums.RaceDataEvent.RaceCanceled, (await RaceDataDao.FindByIdAsync(raceData.Id))?.EventTypeId);
        }
示例#2
0
        public async Task GetStartTimeForStartListTest()
        {
            var skierEvents = await SkierEventDao.FindAllAsync();

            var startEvent = skierEvents.First(sk => sk.RaceData.EventTypeId == 8);

            startEvent.RaceData.EventDateTime = DateTime.Today;
            await RaceDataDao.UpdateAsync(startEvent.RaceData);

            Assert.AreEqual(DateTime.Today,
                            (await TimeDataDao.GetStartTimeForStartList(startEvent.SkierId, startEvent.RaceId)).Value);
        }