Beispiel #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;
            }

            _tagsController.ShouldHaveAttribute(methodName, attributeType);
            _tagsController.ShouldHaveRouteAttributeWithTemplate(methodName, routeTemplate);
        }