public void Given_Type_Should_HasJsonSuffix_ReturnValue()
        {
            var result = ContentTypeValidator.HasJsonSuffix("lorem ipsum");

            result.Should().BeFalse();

            result = ContentTypeValidator.HasJsonSuffix("application/cloudevents+json");
            result.Should().BeTrue();
        }
        /// <summary>
        /// Checks whether the content type of the <see cref="CloudEvent{T}"/> instance indicates structured or not.
        /// </summary>
        /// <param name="ce"><see cref="CloudEvent{T}"/> instance.</param>
        /// <returns>Returns <c>True</c>, if the content type indicates structured; otherwise returns <c>False</c>.</returns>
        protected static bool IsStructuredCloudEventContentType(CloudEvent <T> ce)
        {
            if (ContentTypeValidator.IsJson(ce.ContentType))
            {
                return(true);
            }

            if (ContentTypeValidator.HasJsonSuffix(ce.ContentType))
            {
                return(true);
            }

            if (ContentTypeValidator.ImpliesJson(ce.ContentType))
            {
                return(true);
            }

            return(false);
        }
        private static bool IsJson(string contentType)
        {
            if (ContentTypeValidator.IsJson(contentType))
            {
                return(true);
            }

            if (ContentTypeValidator.HasJsonSuffix(contentType))
            {
                return(true);
            }

            if (ContentTypeValidator.ImpliesJson(contentType))
            {
                return(true);
            }

            return(false);
        }