/// <summary> /// Initializes a new instance of the <see cref="HydraApiDocumentationModule"/> class. /// </summary> public HydraApiDocumentationModule(IHydraDocumentationSettings settings, ApiDocumentationFactory buidler) { Get[settings.DocumentationPath] = route => { var apiDocumentation = buidler.Create(); apiDocumentation.Id = Request.GetApiDocumentationUri(settings.DocumentationPath); return(apiDocumentation); }; }
public void Should_only_include_each_type_once() { // given A.CallTo(() => _documentedTypeSource.FindTypes()).Returns(new List <Type> { typeof(Issue), typeof(Issue) }); // when var apiDocumentation = _factory.Create(); // then apiDocumentation.SupportedClasses.Should().HaveCount(1); }