Exemplo n.º 1
0
        [InlineData(-1, 0)] //Non-Existent Student
        public void getStudentWishlistTest(int sid, int numEntries)
        {
            //Arrange
            var user = new ClaimsPrincipal(new ClaimsIdentity(new Claim[]
            {
                new Claim("sid", sid.ToString())
            }));

            _controller.ControllerContext = new ControllerContext()
            {
                HttpContext = new DefaultHttpContext {
                    User = user
                }
            };

            var result = _controller.getStudentWishlist();

            Assert.NotNull(result);
            Assert.True(result.Value.Count == numEntries);
        }