CarbonFitnessTest.Web.AuthorizeTest.shouldHaveAuthorizeAttributeOnAllActions C# (CSharp) Метод

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

private shouldHaveAuthorizeAttributeOnAllActions ( ) : void
Результат void
        public void shouldHaveAuthorizeAttributeOnAllActions()
        {
            var controllerTypes = getControllerTypes(typeof(HomeController).Assembly);
            var actionMethods = getActionMethods(controllerTypes);

            foreach (var action in actionMethods) {
                if (IsExcludedFromAuthorizeRule(action)) continue;
                Assert.That(
                    HasAuthorizeAttribute(action),
                    "Action method " + action.DeclaringType.Name + "/" + action.Name + " doesn't have required AuthorizeAttribute"
                    );
            }
        }