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

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

            Assert.True(match);
        }
Ejemplo 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);
 }