예제 #1
0
        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());
        }
예제 #2
0
        public async Task GetPossibleDisciplinesTest()
        {
            var id = (await SkierDao.FindAllAsync()).First().Id;

            Assert.AreEqual(2, (await SkierDao.GetPossibleDisciplinesForSkier(id)).Count());
        }
예제 #3
0
 public async Task FindAllTest() => Assert.AreEqual(5, (await SkierDao.FindAllAsync()).Count());