コード例 #1
0
        public void Match_FailsWhenValueIsNotDecimal()
        {
            DecimalHttpRouteConstraint constraint = new DecimalHttpRouteConstraint();
            bool match = TestValue(constraint, false);

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

            Assert.True(match);
        }
コード例 #3
0
        public void Match_FailsWhenValueIsNotParsableAsDecimal()
        {
            DecimalHttpRouteConstraint constraint = new DecimalHttpRouteConstraint();
            bool match = TestValue(constraint, "what a nice day!");

            Assert.False(match);
        }
コード例 #4
0
 public void Match_FailsWhenValueIsNotDecimal()
 {
     DecimalHttpRouteConstraint constraint = new DecimalHttpRouteConstraint();
     bool match = TestValue(constraint, false);
     Assert.False(match);
 }
コード例 #5
0
 public void Match_SucceedsWhenValueIsDecimalString()
 {
     DecimalHttpRouteConstraint constraint = new DecimalHttpRouteConstraint();
     bool match = TestValue(constraint, "3.14");
     Assert.True(match);
 }
コード例 #6
0
 public void Match_FailsWhenValueIsNotParsableAsDecimal()
 {
     DecimalHttpRouteConstraint constraint = new DecimalHttpRouteConstraint();
     bool match = TestValue(constraint, "what a nice day!");
     Assert.False(match);
 }