Ejemplo n.º 1
0
        public async Task DeleteAllPossibleDisciplineTest()
        {
            var skierId = (await SkierDao.FindAllAsync()).First().Id;
            await SkierDao.DeleteAllPossibleDisciplineForSkier(skierId);

            Assert.AreEqual(0, (await SkierDao.GetPossibleDisciplinesForSkier(skierId)).Count());
        }
Ejemplo n.º 2
0
        public async Task AddPossibleDisciplineTest()
        {
            var disciplineId = await DisciplineDao.InsertGetIdAsync(new Discipline
            {
                DisciplineName = "TestDiscipline"
            });

            var skierId = (await SkierDao.FindAllAsync()).First().Id;
            await SkierDao.InsertPossibleDisciplineForSkier(skierId, disciplineId.Value);

            Assert.AreEqual(3, (await SkierDao.GetPossibleDisciplinesForSkier(skierId)).Count());
        }
Ejemplo n.º 3
0
        public async Task GetPossibleDisciplinesTest()
        {
            var id = (await SkierDao.FindAllAsync()).First().Id;

            Assert.AreEqual(2, (await SkierDao.GetPossibleDisciplinesForSkier(id)).Count());
        }