public void Match_FailsWhenValueContainsNonAlphaNum() { AlphaHttpRouteConstraint constraint = new AlphaHttpRouteConstraint(); bool match = TestValue(constraint, "abc_"); Assert.False(match); }
public void Match_FailsWhenValueIsAvailableAndInnerConstraintFails() { IHttpRouteConstraint innerConstraint = new AlphaHttpRouteConstraint(); OptionalHttpRouteConstraint constraint = new OptionalHttpRouteConstraint(innerConstraint); bool match = TestValue(constraint, "123"); Assert.False(match); }
public void Match_SucceedsWhenValueIsAlpha() { AlphaHttpRouteConstraint constraint = new AlphaHttpRouteConstraint(); bool match = TestValue(constraint, "abcABC"); Assert.True(match); }
public void Match_SucceedsWhenValueIsNotAvailable() { IHttpRouteConstraint innerConstraint = new AlphaHttpRouteConstraint(); OptionalHttpRouteConstraint constraint = new OptionalHttpRouteConstraint(innerConstraint); bool match = TestValue(constraint, RouteParameter.Optional); Assert.True(match); }
public void Match_SucceedsWhenValueIsAvailableAndInnerConstraintSucceeds() { IHttpRouteConstraint innerConstraint = new AlphaHttpRouteConstraint(); OptionalHttpRouteConstraint constraint = new OptionalHttpRouteConstraint(innerConstraint); bool match = TestValue(constraint, "abc"); Assert.True(match); }
public void Match_FailsWhenValueIsAvailableAndInnerConstraintFails() { IHttpRouteConstraint innerConstraint = new AlphaHttpRouteConstraint(); OptionalHttpRouteConstraint constraint = new OptionalHttpRouteConstraint(innerConstraint); bool match = TestValue(constraint, "123"); Assert.False(match); }
public void Match_SucceedsWhenValueIsNotAvailable() { IHttpRouteConstraint innerConstraint = new AlphaHttpRouteConstraint(); OptionalHttpRouteConstraint constraint = new OptionalHttpRouteConstraint(innerConstraint); bool match = TestValue(constraint, RouteParameter.Optional); Assert.True(match); }
public void Match_SucceedsWhenValueIsAvailableAndInnerConstraintSucceeds() { IHttpRouteConstraint innerConstraint = new AlphaHttpRouteConstraint(); OptionalHttpRouteConstraint constraint = new OptionalHttpRouteConstraint(innerConstraint); bool match = TestValue(constraint, "abc"); Assert.True(match); }
public void Match_FailsWhenValueContainsNonAlphaNum() { AlphaHttpRouteConstraint constraint = new AlphaHttpRouteConstraint(); bool match = TestValue(constraint, "abc_"); Assert.False(match); }
public void Match_SucceedsWhenValueIsAlpha() { AlphaHttpRouteConstraint constraint = new AlphaHttpRouteConstraint(); bool match = TestValue(constraint, "abcABC"); Assert.True(match); }