コード例 #1
0
        public async void buildFindCourseViewModelTestAsync_HappyPath()
        {
            Student             student             = _context.Students.Find(1);
            FindCourseViewModel findCourseViewModel = await _viewModelService.buildFindCourseViewModelAsync(student);

            Assert.True(findCourseViewModel.courseList.First().courseId == 12);
            Assert.True(findCourseViewModel.courseList.Count() == 8);
        }
コード例 #2
0
        public async Task <IActionResult> Register()
        {
            var curUser = await _userManager.GetUserAsync(this.User);

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

            FindCourseViewModel thisView = await _viewModelSerivce.buildFindCourseViewModelAsync(stu);

            return(View(thisView));
        }