Пример #1
0
        [InlineData(1, 5)] //No Priority Change
        public async Task updatePriorityDownTest(int sid, int cid)
        {
            //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 = await _controller.updatePriorityDown(cid);

            Assert.IsType <OkResult>(result);
        }