public void Given_Null_When_HasInterface_Invoked_Then_It_Should_Return_False()
        {
            var result = TypeExtensions.HasInterface <IOpenApiCustomResponseHeader>(null);

            result.Should().BeFalse();

            result = TypeExtensions.HasInterface(null, "IOpenApiCustomResponseHeader");
            result.Should().BeFalse();
        }
        public void Given_CamelCaseNamingStrategy_When_GetOpenApiTypeName_Invoked_Then_It_Should_Return_Result()
        {
            var type     = typeof(int);
            var strategy = new CamelCaseNamingStrategy();

            var result = TypeExtensions.GetOpenApiTypeName(type, strategy);

            result.Should().Be("int32");
        }
        public void Given_NonGenericType_When_GetUnderlyingType_Invoked_Then_It_Should_Return_Null(Type type)
        {
            var result = TypeExtensions.GetUnderlyingType(type);

            result.Should().BeNull();
        }
        public void Given_DictionaryTypes_When_IsOpenApiDictionary_Invoked_Then_It_Should_Return_Result(Type type, bool expected)
        {
            var result = TypeExtensions.IsOpenApiDictionary(type);

            result.Should().Be(expected);
        }
        public void Given_Type_When_HasInterface_Invoked_Then_It_Should_Return_Result(Type type, bool expected)
        {
            var result = TypeExtensions.HasInterface(type, "IOpenApiCustomResponseHeader");

            result.Should().Be(expected);
        }
        public void Given_Valid_TypeReference_When_HasInterface_Invoked_Then_It_Should_Return_Result()
        {
            var result = TypeExtensions.HasInterface <IOpenApiCustomResponseHeader>(typeof(FakeResponseHeader));

            result.Should().BeTrue();
        }
        public void Given_Type_When_IsExceptionType_Invoked_Then_It_Should_Return_Result(Type type, bool expected)
        {
            var result = TypeExtensions.IsOpenApiException(type);

            result.Should().Be(expected);
        }
        public void Given_Type_When_IsReferentialType_Invoked_Then_It_Should_Return_Result(Type type, bool expected)
        {
            var result = TypeExtensions.IsReferentialType(type);

            result.Should().Be(expected);
        }
        public void Given_NullableDictionaryType_When_GetUnderlyingType_Invoked_Then_It_Should_Return_Result(Type type, Type expected)
        {
            var result = TypeExtensions.GetUnderlyingType(type);

            result.Should().Be(expected);
        }
        public void Given_Invalid_TypeReference_When_HasInterface_Invoked_Then_It_Should_Return_Result()
        {
            var result = TypeExtensions.HasInterface <IOpenApiResponseHeaderType>(typeof(FakeModel));

            result.Should().BeFalse();
        }