示例#1
0
            public void ShortCircuitOnGraphCycle()
            {
                var          api  = CreateApiDescription(httpConfiguration, actionName: "Cyclical");
                TestDelegate call = () => ApiDescriptionExtensions.Flatten(api, api.ParameterDescriptions.Single(), documentationProvider);

                Assert.That(call, Throws.Nothing);
            }
示例#2
0
            public void ConvertComplexWithArray()
            {
                var api = CreateApiDescription(httpConfiguration, actionName: "ComplexWithArray");

                var results = ApiDescriptionExtensions.Flatten(api, api.ParameterDescriptions.Single(), documentationProvider);

                var result = results.Single();

                Assert.That(result.IsMany, Is.True, "SimpleApiDescription.IsMany");
            }
示例#3
0
            public void ConvertArray()
            {
                var api = CreateApiDescription(httpConfiguration, actionName: "Array");

                var results = ApiDescriptionExtensions.Flatten(api, api.ParameterDescriptions.Single(), documentationProvider);

                var result = results.Single();

                Assert.That(result.Name, Is.EqualTo("array"));
                Assert.That(result.IsOptional, Is.False, "IsOptional");
                Assert.That(result.CallingConvention, Is.EqualTo("body"));
                Assert.That(result.IsMany, Is.True, "SimpleApiDescription.IsMany");
            }