Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Http/Routing/test/UnitTests/Constraints/DoubleRouteConstraintTests.cs')
-rw-r--r--src/Http/Routing/test/UnitTests/Constraints/DoubleRouteConstraintTests.cs35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/Http/Routing/test/UnitTests/Constraints/DoubleRouteConstraintTests.cs b/src/Http/Routing/test/UnitTests/Constraints/DoubleRouteConstraintTests.cs
index fef54a2dfe..0881ca8cd2 100644
--- a/src/Http/Routing/test/UnitTests/Constraints/DoubleRouteConstraintTests.cs
+++ b/src/Http/Routing/test/UnitTests/Constraints/DoubleRouteConstraintTests.cs
@@ -4,27 +4,26 @@
using Microsoft.AspNetCore.Routing.Constraints;
using Xunit;
-namespace Microsoft.AspNetCore.Routing.Tests
+namespace Microsoft.AspNetCore.Routing.Tests;
+
+public class DoubleRouteConstraintTests
{
- public class DoubleRouteConstraintTests
+ [Theory]
+ [InlineData("3.14", true)]
+ [InlineData(3.14f, true)]
+ [InlineData(3.14d, true)]
+ [InlineData("1.79769313486232E+300", true)]
+ [InlineData("not-parseable-as-double", false)]
+ [InlineData(false, false)]
+ public void DoubleRouteConstraint_ApplyConstraint(object parameterValue, bool expected)
{
- [Theory]
- [InlineData("3.14", true)]
- [InlineData(3.14f, true)]
- [InlineData(3.14d, true)]
- [InlineData("1.79769313486232E+300", true)]
- [InlineData("not-parseable-as-double", false)]
- [InlineData(false, false)]
- public void DoubleRouteConstraint_ApplyConstraint(object parameterValue, bool expected)
- {
- // Arrange
- var constraint = new DoubleRouteConstraint();
+ // Arrange
+ var constraint = new DoubleRouteConstraint();
- // Act
- var actual = ConstraintsTestHelper.TestConstraint(constraint, parameterValue);
+ // Act
+ var actual = ConstraintsTestHelper.TestConstraint(constraint, parameterValue);
- // Assert
- Assert.Equal(expected, actual);
- }
+ // Assert
+ Assert.Equal(expected, actual);
}
}