Blog.Common.Web.Tests.Attributes.BlogAuthorizationAttributeTest.ShouldReturnUnauthorizedWhenNotAuthenticated C# (CSharp) Метод

ShouldReturnUnauthorizedWhenNotAuthenticated() приватный Метод

private ShouldReturnUnauthorizedWhenNotAuthenticated ( ) : void
Результат void
        public void ShouldReturnUnauthorizedWhenNotAuthenticated()
        {
            _requestBase.SetupGet(r => r.IsAuthenticated).Returns(false);

            var attribute = new BlogAuthorizationAttribute();
            attribute.OnAuthentication(_authenticationContext.Object);

            Assert.IsInstanceOf(typeof(HttpUnauthorizedResult), _authenticationContext.Object.Result);
        }