public void MatchWithNoEmailParamDoesNotMatch()
        {
            var sut = new EmailRouteConstraint();

            Assert.False(
                sut.Match(
                    new HttpRequestMessage(),
                    Mock.Of<IHttpRoute>(),
                    "email",
                    new Dictionary<string, object>(),
                    HttpRouteDirection.UriGeneration));
        }
        public void MatchWithNoEmailParamDoesNotMatch()
        {
            var sut = new EmailRouteConstraint();

            Assert.False(
                sut.Match(
                    new HttpRequestMessage(),
                    Mock.Of <IHttpRoute>(),
                    "email",
                    new Dictionary <string, object>(),
                    HttpRouteDirection.UriGeneration));
        }
        public void MatchReturnsProperResponse(string email, bool isMatch)
        {
            var sut = new EmailRouteConstraint();

            var parameterName = "email";
            var values = new Dictionary<string, object>();

            values.Add(parameterName, email);

            Assert.Equal(
                isMatch,
                sut.Match(
                    new HttpRequestMessage(),
                    Mock.Of<IHttpRoute>(),
                    parameterName,
                    values,
                    HttpRouteDirection.UriGeneration));
        }
        public void MatchReturnsProperResponse(string email, bool isMatch)
        {
            var sut = new EmailRouteConstraint();

            var parameterName = "email";
            var values        = new Dictionary <string, object>();

            values.Add(parameterName, email);

            Assert.Equal(
                isMatch,
                sut.Match(
                    new HttpRequestMessage(),
                    Mock.Of <IHttpRoute>(),
                    parameterName,
                    values,
                    HttpRouteDirection.UriGeneration));
        }