Example #1
0
        public void GetExam_Test()
        {
            _manager.Add(EXAM);

            Exam exam = _manager.Get(1);

            Assert.Equal("ASP .NET", exam.Course.CourseName);
        }
Example #2
0
        // GET: Exam/Details/5
        public IActionResult Details(int?id)
        {
            if (id == 0)
            {
                return(NotFound());
            }

            ExamViewModel examViewModel = MapToExamViewModel(_examManager.Get(id));

            if (examViewModel == null)
            {
                return(NotFound());
            }

            return(View(examViewModel));
        }