コード例 #1
0
        public void TestControllerClassAttributes()
        {
            ControllerReflection.ControllerInherits("ApplicationController");

            ControllerReflection.ClassExpectedAttribute <AutoValidateAntiforgeryTokenAttribute>(2);
            ControllerReflection.ClassExpectedAttribute <ControllerAttribute>(2);
        }
コード例 #2
0
        public void TestControllerClassAttributes()
        {
            ControllerReflection.ControllerInherits("ApplicationController");
            var authAttribute = ControllerReflection.ClassExpectedAttribute <AuthorizeAttribute>(3);

            authAttribute.ElementAt(0).Roles.ShouldBeNull();

            ControllerReflection.ClassExpectedAttribute <AutoValidateAntiforgeryTokenAttribute>(3);
            ControllerReflection.ClassExpectedAttribute <ControllerAttribute>(3);
        }
コード例 #3
0
        public void TestControllerClassAttributes()
        {
            ControllerReflection.ControllerInherits("Controller");

            ControllerReflection.ClassExpectedAttribute <ControllerAttribute>(1);
        }