Skip to content

Commit

Permalink
Ensure leaf nodes have no children
Browse files Browse the repository at this point in the history
  • Loading branch information
mderriey committed Mar 7, 2024
1 parent 35398a1 commit 996407c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 996407c

Please sign in to comment.