Beispiel #1
0
        public void GetbyId()
        {
            InitializeDataBase();

            using (var context = new ApplicationContext(options))
            {
                int             cursoId         = 2;
                CursoController cursoController = new CursoController(context);
                Curso           c = cursoController.GetCurso(cursoId).Result.Value;
                Assert.Equal(2, c.Id);
            }
        }
Beispiel #2
0
        public void GetAll()
        {
            InitializeDataBase();

            using (var context = new ApplicationContext(options))
            {
                CursoController     cursoController = new CursoController(context);
                IEnumerable <Curso> cursos          = cursoController.GetCurso().Result.Value;

                Assert.Equal(3, cursos.Count());
            }
        }