Exemplo n.º 1
0
        public void buildWishlistViewModelTest_HappyPath()
        {
            Student           thisStudent = _context.Students.Find(1);
            WishlistViewModel test        = _viewModelService.buildWishlistViewModel(thisStudent);

            Assert.True(test.courses.First().courseId == 1);
            Assert.True(test.courses.Count() == 5);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Wishlist()
        {
            var curUser = await _userManager.GetUserAsync(this.User);

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

            WishlistViewModel thisView = _viewModelSerivce.buildWishlistViewModel(stu);

            return(View(thisView));
        }