コード例 #1
0
        public void Get_methods_should_be_HttpGet_with_custom_routeTemplate_and_allow_anonymous(string methodName, string routeTemplate = "")
        {
            Type attributeType = typeof(HttpGetAttribute);

            if (string.IsNullOrEmpty(routeTemplate))
            {
                routeTemplate = methodName;
            }

            _pagesController.ShouldHaveAttribute(methodName, attributeType);
            _pagesController.ShouldHaveRouteAttributeWithTemplate(methodName, routeTemplate);
            _pagesController.ShouldAllowAnonymous(methodName);
        }