public void ValidatorShouldFailForInvalidField()
        {
            var r = new SearchPayload()
            {
                SearchTerm = new[]
                {
                    new SearchTerm()
                    {
                        Field    = "Field",
                        Operator = (SearchOperator)100,
                        Value    = "value"
                    }
                }
            };

            Assert.Throws(typeof(ValidationException), () => r.Validate());
        }
        public void ValidatorShouldSuccessForValidField()
        {
            var r = new SearchPayload()
            {
                SearchTerm = new[]
                {
                    new SearchTerm()
                    {
                        Field    = "Field",
                        Operator = SearchOperator.EQ,
                        Value    = "value"
                    }
                }
            };

            r.Validate();
        }