public void ActionLevelDeleteRequest()
        {
            var resolver = new RequiredPermissionsResolver();
            var context  = CreateAuthorizationHandlerContext(typeof(ConventionsBasedResourceController), "Delete", HttpMethod.Delete);

            var requiredPermissions = resolver.ResolveFromConvention(context);

            Assert.Equal("delete-conventionsbasedresource", requiredPermissions);
        }
        public void ResolveControllerPermission()
        {
            var resolver = new RequiredPermissionsResolver();
            var context  = CreateAuthorizationHandlerContext(typeof(CustomBasedResourceController), "Get");

            var requiredPermissions = resolver.ResolveFromAttributeProperties(context);

            Assert.Equal(1, requiredPermissions.Count());
            Assert.Contains("controllerpermission", requiredPermissions);
        }