public async Task GetRemainingStartListForRaceTest() { var race = (await RaceDao.FindAllAsync()).First(); Assert.AreEqual(0, (await StartListDao.GetRemainingStartListForRace(race.Id)).Count()); var skierId = await SkierDao.InsertGetIdAsync(new Skier { Retired = false, FirstName = "F", LastName = "S", CountryId = (await CountryDao.FindAllAsync()).First().Id, GenderId = race.GenderId, DateOfBirth = DateTime.Now }); await StartListDao.InsertAsync(new StartList { RaceId = race.Id, SkierId = skierId.Value, StartNumber = 99, StartStateId = (int)StartState.Upcoming }); Assert.AreEqual(1, (await StartListDao.GetRemainingStartListForRace(race.Id)).Count()); }
public async Task GetPossibleDisciplinesTest() { var id = (await SkierDao.FindAllAsync()).First().Id; Assert.AreEqual(2, (await SkierDao.GetPossibleDisciplinesForSkier(id)).Count()); }
public async Task FindAllTest() => Assert.AreEqual(5, (await SkierDao.FindAllAsync()).Count());