diff options
Diffstat (limited to 'src/Http/Routing/test/UnitTests/Matching/ZeroEntryJumpTableTest.cs')
-rw-r--r-- | src/Http/Routing/test/UnitTests/Matching/ZeroEntryJumpTableTest.cs | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/src/Http/Routing/test/UnitTests/Matching/ZeroEntryJumpTableTest.cs b/src/Http/Routing/test/UnitTests/Matching/ZeroEntryJumpTableTest.cs index 1db558483e..0fedd5218f 100644 --- a/src/Http/Routing/test/UnitTests/Matching/ZeroEntryJumpTableTest.cs +++ b/src/Http/Routing/test/UnitTests/Matching/ZeroEntryJumpTableTest.cs @@ -3,34 +3,33 @@ using Xunit; -namespace Microsoft.AspNetCore.Routing.Matching +namespace Microsoft.AspNetCore.Routing.Matching; + +public class ZeroEntryJumpTableTest { - public class ZeroEntryJumpTableTest + [Fact] + public void GetDestination_ZeroLengthSegment_JumpsToExit() + { + // Arrange + var table = new ZeroEntryJumpTable(0, 1); + + // Act + var result = table.GetDestination("ignored", new PathSegment(0, 0)); + + // Assert + Assert.Equal(1, result); + } + + [Fact] + public void GetDestination_SegmentWithLength_JumpsToDefault() { - [Fact] - public void GetDestination_ZeroLengthSegment_JumpsToExit() - { - // Arrange - var table = new ZeroEntryJumpTable(0, 1); - - // Act - var result = table.GetDestination("ignored", new PathSegment(0, 0)); - - // Assert - Assert.Equal(1, result); - } - - [Fact] - public void GetDestination_SegmentWithLength_JumpsToDefault() - { - // Arrange - var table = new ZeroEntryJumpTable(0, 1); - - // Act - var result = table.GetDestination("ignored", new PathSegment(0, 1)); - - // Assert - Assert.Equal(0, result); - } + // Arrange + var table = new ZeroEntryJumpTable(0, 1); + + // Act + var result = table.GetDestination("ignored", new PathSegment(0, 1)); + + // Assert + Assert.Equal(0, result); } } |