public async Task DontThrowExceptionWhenDontExist() { RoutesDocumentationProvider provider = await CreateProviderAsync(); var docs = provider.GetRouteDocs(new[] { "notExisting1", "notExisting2" }, DefaultRoutes .AddRoute("notExisting1", "/api/notExisting1/endpoint1") .AddRoute("notExisting1", "/api/notExisting2/endpoint1")).ToList(); docs.Should().HaveCount(2); }
public async Task GetDocs(string firstService, string secondService, string parameters = null, string paramsMap = null) { RoutesDocumentationProvider provider = await CreateProviderAsync(); var docs = provider.GetRouteDocs(new[] { firstService, secondService }, DefaultRoutes .AddRoute(firstService, $"/api/{firstService}/endpoint1{parameters}") .AddRoute(secondService, $"/api/{secondService}/endpoint1{parameters}", paramsMap)).ToList(); docs.Should().HaveCount(2); IsValid(docs[0], firstService); IsValid(docs[1], secondService); }