public void MaxRouteConstraintTests(long max, int parameterValue, bool expected)
        {
            var constraint = new MaxRouteConstraint(max);
            var actual     = TestValue(constraint, parameterValue);

            Assert.Equal(expected, actual);
        }
Beispiel #2
0
    public void MaxRouteConstraint_ApplyConstraint(long max, int parameterValue, bool expected)
    {
        // Arrange
        var constraint = new MaxRouteConstraint(max);

        // Act
        var actual = ConstraintsTestHelper.TestConstraint(constraint, parameterValue);

        // Assert
        Assert.Equal(expected, actual);
    }
 private static void ApplyMaxRouteConstraint(OpenApiSchema schema, MaxRouteConstraint maxRouteConstraint)
 => schema.Maximum = maxRouteConstraint.Max;