diff options
Diffstat (limited to 'src/Http/Routing/test/UnitTests/Constraints/AlphaRouteConstraintTests.cs')
-rw-r--r-- | src/Http/Routing/test/UnitTests/Constraints/AlphaRouteConstraintTests.cs | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/Http/Routing/test/UnitTests/Constraints/AlphaRouteConstraintTests.cs b/src/Http/Routing/test/UnitTests/Constraints/AlphaRouteConstraintTests.cs index 2c3f4acfc3..1ef3882fa3 100644 --- a/src/Http/Routing/test/UnitTests/Constraints/AlphaRouteConstraintTests.cs +++ b/src/Http/Routing/test/UnitTests/Constraints/AlphaRouteConstraintTests.cs @@ -4,29 +4,28 @@ using Microsoft.AspNetCore.Routing.Constraints; using Xunit; -namespace Microsoft.AspNetCore.Routing.Tests +namespace Microsoft.AspNetCore.Routing.Tests; + +public class AlphaRouteConstraintTests { - public class AlphaRouteConstraintTests + [Theory] + [InlineData("alpha", true)] + [InlineData("a1pha", false)] + [InlineData("ALPHA", true)] + [InlineData("A1PHA", false)] + [InlineData("alPHA", true)] + [InlineData("A1pHA", false)] + [InlineData("AlpHA╥", false)] + [InlineData("", true)] + public void AlphaRouteConstraintTest(string parameterValue, bool expected) { - [Theory] - [InlineData("alpha", true)] - [InlineData("a1pha", false)] - [InlineData("ALPHA", true)] - [InlineData("A1PHA", false)] - [InlineData("alPHA", true)] - [InlineData("A1pHA", false)] - [InlineData("AlpHA╥", false)] - [InlineData("", true)] - public void AlphaRouteConstraintTest(string parameterValue, bool expected) - { - // Arrange - var constraint = new AlphaRouteConstraint(); + // Arrange + var constraint = new AlphaRouteConstraint(); - // Act - var actual = ConstraintsTestHelper.TestConstraint(constraint, parameterValue); + // Act + var actual = ConstraintsTestHelper.TestConstraint(constraint, parameterValue); - // Assert - Assert.Equal(expected, actual); - } + // Assert + Assert.Equal(expected, actual); } } |