Exemple #1
0
        public void ShouldNotHaveDuplicateEndpoints()
        {
            var detector     = new DuplicateEndpointDetector(_factory.Services);
            var endpointData = _factory.Services.GetRequiredService <EndpointDataSource>();

            var duplicates = detector.GetDuplicateEndpoints(endpointData);

            foreach (var keyValuePair in duplicates)
            {
                var allMatches = string.Join(", ", keyValuePair.Value);
                _output.WriteLine($"Duplicate: '{keyValuePair.Key}'. Matches: {allMatches}");
            }

            Assert.Empty(duplicates);
        }
Exemple #2
0
 public object DuplicateRoutes()
 {
     return(_detector.GetDuplicateEndpoints(_endpointData));
 }