コード例 #1
0
        public void Match_FailsWhenValueIsNotBool()
        {
            BoolHttpRouteConstraint constraint = new BoolHttpRouteConstraint();
            bool match = TestValue(constraint, 123);

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

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

            Assert.False(match);
        }
コード例 #4
0
 public void Match_FailsWhenValueIsNotBool()
 {
     BoolHttpRouteConstraint constraint = new BoolHttpRouteConstraint();
     bool match = TestValue(constraint, 123);
     Assert.False(match);
 }
コード例 #5
0
 public void Match_SucceedsWhenValueIsTrueString()
 {
     BoolHttpRouteConstraint constraint = new BoolHttpRouteConstraint();
     bool match = TestValue(constraint, "true");
     Assert.True(match);
 }
コード例 #6
0
 public void Match_FailsWhenValueIsNotParsableAsBool()
 {
     BoolHttpRouteConstraint constraint = new BoolHttpRouteConstraint();
     bool match = TestValue(constraint, "wakawaka");
     Assert.False(match);
 }