public void buildHistoryViewModelTest_HappyPath()
        {
            Student          student          = _context.Students.Find(1);
            HistoryViewModel historyViewModel = _viewModelService.buildHistoryViewModel(student);

            Assert.True(historyViewModel.courses.First().courseId == 1);
            Assert.True(historyViewModel.courses.Count() == 12);
        }
Beispiel #2
0
        public async Task <IActionResult> History()
        {
            var curUser = await _userManager.GetUserAsync(this.User);

            Student stu = await _studentSerivce.getStudentAsync(curUser.StudentId);

            HistoryViewModel completeCourses = _viewModelSerivce.buildHistoryViewModel(stu);

            return(View(completeCourses));
        }