public void Match_FailsWhenAnyInnerConstraintFails()
        {
            IHttpRouteConstraint[] innerConstraints = new IHttpRouteConstraint[]
            {
                new AlphaHttpRouteConstraint(), 
                new LengthHttpRouteConstraint(3)
            };

            CompoundHttpRouteConstraint constraint = new CompoundHttpRouteConstraint(innerConstraints);
            bool match = TestValue(constraint, "abcd");
            Assert.False(match);
        }
        public void Match_SucceedsWhenInnerConstraintsMatch()
        {
            IHttpRouteConstraint[] innerConstraints = new IHttpRouteConstraint[]
            {
                new AlphaHttpRouteConstraint(), 
                new LengthHttpRouteConstraint(3)
            };

            CompoundHttpRouteConstraint constraint = new CompoundHttpRouteConstraint(innerConstraints);
            bool match = TestValue(constraint, "abc");
            Assert.True(match);
        }
        public void Match_FailsWhenAnyInnerConstraintFails()
        {
            IHttpRouteConstraint[] innerConstraints = new IHttpRouteConstraint[]
            {
                new AlphaHttpRouteConstraint(),
                new LengthHttpRouteConstraint(3)
            };

            CompoundHttpRouteConstraint constraint = new CompoundHttpRouteConstraint(innerConstraints);
            bool match = TestValue(constraint, "abcd");

            Assert.False(match);
        }
        public void Match_SucceedsWhenInnerConstraintsMatch()
        {
            IHttpRouteConstraint[] innerConstraints = new IHttpRouteConstraint[]
            {
                new AlphaHttpRouteConstraint(),
                new LengthHttpRouteConstraint(3)
            };

            CompoundHttpRouteConstraint constraint = new CompoundHttpRouteConstraint(innerConstraints);
            bool match = TestValue(constraint, "abc");

            Assert.True(match);
        }