Esempio n. 1
0
        public void Match_FailsWhenValueIsNotGuid()
        {
            GuidHttpRouteConstraint constraint = new GuidHttpRouteConstraint();
            bool match = TestValue(constraint, false);

            Assert.False(match);
        }
Esempio n. 2
0
        public void Match_SucceedsWhenValueIsGuidString()
        {
            GuidHttpRouteConstraint constraint = new GuidHttpRouteConstraint();
            bool match = TestValue(constraint, Guid.NewGuid().ToString());

            Assert.True(match);
        }
Esempio n. 3
0
        public void Match_FailsWhenValueIsNotParsableAsGuid()
        {
            GuidHttpRouteConstraint constraint = new GuidHttpRouteConstraint();
            bool match = TestValue(constraint, "this-is-not-a-guid");

            Assert.False(match);
        }
 public void Match_FailsWhenValueIsNotGuid()
 {
     GuidHttpRouteConstraint constraint = new GuidHttpRouteConstraint();
     bool match = TestValue(constraint, false);
     Assert.False(match);
 }
 public void Match_SucceedsWhenValueIsGuidString()
 {
     GuidHttpRouteConstraint constraint = new GuidHttpRouteConstraint();
     bool match = TestValue(constraint, Guid.NewGuid().ToString());
     Assert.True(match);
 }
 public void Match_FailsWhenValueIsNotParsableAsGuid()
 {
     GuidHttpRouteConstraint constraint = new GuidHttpRouteConstraint();
     bool match = TestValue(constraint, "this-is-not-a-guid");
     Assert.False(match);
 }