diff --git a/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs b/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs index 5303d7390..4760cf37a 100644 --- a/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs +++ b/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs @@ -495,8 +495,9 @@ public void SupportsTrailingSlashesInPath(string path, string[] childrenBeforeLa secondToLeafNode = secondToLeafNode.Children[childName]; } - Assert.True(secondToLeafNode.Children.TryGetValue(expectedLeafNodeName, out var lastNode)); - Assert.Equal(expectedLeafNodePath, lastNode.Path); + Assert.True(secondToLeafNode.Children.TryGetValue(expectedLeafNodeName, out var leafNode)); + Assert.Equal(expectedLeafNodePath, leafNode.Path); + Assert.Empty(leafNode.Children); } } }