Exemplo n.º 1
0
        public void Class_ShouldHaveAuthorizeAttribute()
        {
            // Act
            var hasAttribute = AttributeTester.ClassHasAttribute(typeof(NotificationsHub), typeof(AuthorizeAttribute));

            // Assert
            Assert.IsTrue(hasAttribute);
        }
Exemplo n.º 2
0
        public void HasAllowAnonymousAttribute_Always(Type attrType)
        {
            // Arrange & Act
            var llResult = AttributeTester.ClassHasAttribute(typeof(CompanyAnonymousController), attrType);

            // Assert
            Assert.IsTrue(llResult);
        }
Exemplo n.º 3
0
        public void Class_ShouldHaveAuthorizeAttribute()
        {
            // Act
            var hasAttribute = AttributeTester.ClassHasAttribute(typeof(ManageController), typeof(AuthorizeAttribute));

            // Assert
            Assert.IsTrue(hasAttribute);
        }