public void ShortCircuitOnGraphCycle() { var api = CreateApiDescription(httpConfiguration, actionName: "Cyclical"); TestDelegate call = () => ApiDescriptionExtensions.Flatten(api, api.ParameterDescriptions.Single(), documentationProvider); Assert.That(call, Throws.Nothing); }
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"); }
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"); }