Beispiel #1
0
        //https://github.com/Azure/azure-functions-vs-build-sdk/issues/16
        public void HttpTriggerShouldHaveStringForAuthLevelEnum()
        {
            var attribute = new HttpTriggerAttribute(AuthorizationLevel.Function);

            var jObject = attribute.ToJObject();

            jObject.Should().HaveElement("authLevel");
            jObject["authLevel"].Should().Be("function");
        }
        public void HttpTriggerAttributeWithWebHookTypeShouldntHaveAnAuthLevel()
        {
            var attribute = new HttpTriggerAttribute()
            {
                WebHookType = "something"
            };

            var jObject = attribute.ToJObject();

            jObject["authLevel"].Should().BeNull();
        }