コード例 #1
0
        public void Match_FailsWhenValueIsNotLong()
        {
            LongHttpRouteConstraint constraint = new LongHttpRouteConstraint();
            bool match = TestValue(constraint, 3.14M);

            Assert.False(match);
        }
コード例 #2
0
        public void Match_SucceedsWhenValueIsLongString()
        {
            LongHttpRouteConstraint constraint = new LongHttpRouteConstraint();
            bool match = TestValue(constraint, "123456790");

            Assert.True(match);
        }
コード例 #3
0
        public void Match_FailsWhenValueIsNotParsableAsLong()
        {
            LongHttpRouteConstraint constraint = new LongHttpRouteConstraint();
            bool match = TestValue(constraint, "43.567");

            Assert.False(match);
        }
コード例 #4
0
 public void Match_FailsWhenValueIsNotLong()
 {
     LongHttpRouteConstraint constraint = new LongHttpRouteConstraint();
     bool match = TestValue(constraint, 3.14M);
     Assert.False(match);
 }
コード例 #5
0
 public void Match_SucceedsWhenValueIsLongString()
 {
     LongHttpRouteConstraint constraint = new LongHttpRouteConstraint();
     bool match = TestValue(constraint, "123456790");
     Assert.True(match);
 }
コード例 #6
0
 public void Match_FailsWhenValueIsNotParsableAsLong()
 {
     LongHttpRouteConstraint constraint = new LongHttpRouteConstraint();
     bool match = TestValue(constraint, "43.567");
     Assert.False(match);
 }