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); }
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); }