Пример #1
0
        public void Match_FailsWhenValueLengthIsGreaterThanMaxLength()
        {
            MaxLengthHttpRouteConstraint constraint = new MaxLengthHttpRouteConstraint(3);
            bool match = TestValue(constraint, "1234");

            Assert.False(match);
        }
Пример #2
0
        public void Match_SucceedsWhenValueLengthIsEqualToMaxLength()
        {
            MaxLengthHttpRouteConstraint constraint = new MaxLengthHttpRouteConstraint(3);
            bool match = TestValue(constraint, "123");

            Assert.True(match);
        }
 public void Match_FailsWhenValueLengthIsGreaterThanMaxLength()
 {
     MaxLengthHttpRouteConstraint constraint = new MaxLengthHttpRouteConstraint(3);
     bool match = TestValue(constraint, "1234");
     Assert.False(match);
 }
 public void Match_SucceedsWhenValueLengthIsEqualToMaxLength()
 {
     MaxLengthHttpRouteConstraint constraint = new MaxLengthHttpRouteConstraint(3);
     bool match = TestValue(constraint, "123");
     Assert.True(match);
 }