public void IntegerGreaterThanOrEqualToFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.GreaterThanOrEqualTo,
                Value      = "50"
            };

            Assert.False(filter.Evaluate(Sample, "Integer"));
        }
Beispiel #2
0
        public void DoubleLessThanOrEqualToEquals()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.LessThanOrEqualTo,
                Value      = "42.42"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Double"));
        }
Beispiel #3
0
        public void DoubleGreaterThanOrEqualToFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.GreaterThanOrEqualTo,
                Value      = "45.1"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Double"));
        }
Beispiel #4
0
        public void IntegerLessThanFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.LessThan,
                Value      = "30"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Integer"));
        }
Beispiel #5
0
        public void DoubleGreaterThan()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.GreaterThan,
                Value      = "42.1"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Double"));
        }
Beispiel #6
0
        public void StringStartsWithInsensitiveFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.StartsWith,
                Value      = "BROWN FOX"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #7
0
        public void IntegerLessThanOrEqualTo()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.LessThanOrEqualTo,
                Value      = "50"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Integer"));
        }
Beispiel #8
0
        public void StringRegularExpression()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.RegularExpression,
                Value      = "^The.*dog$"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Text"));
        }
Beispiel #9
0
        public void StringStartsWith()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.StartsWith,
                Value      = "The quick"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Text"));
        }
Beispiel #10
0
        public void StringIsBlank()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.IsBlank,
                Value      = string.Empty
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "EmptyText"));
        }
Beispiel #11
0
        public void StringNotEqualToInsensitive()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.NotEqualTo,
                Value      = "JIM BOB"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Text"));
        }
Beispiel #12
0
        public void StringEqualTo()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.EqualTo,
                Value      = Sample.Text
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Text"));
        }
        public void StringEndsWithInsensitive()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.EndsWith,
                Value      = "DOG"
            };

            Assert.True(filter.Evaluate(Sample, "Text"));
        }
        public void DoubleLessThan()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.LessThan,
                Value      = "42.6"
            };

            Assert.True(filter.Evaluate(Sample, "Double"));
        }
Beispiel #15
0
        public void StringRegularExpressionInsensitiveFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.RegularExpression,
                Value      = "^DOG.*THE$"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #16
0
        public void StringDoesNotContainFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.DoesNotContain,
                Value      = "quick"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #17
0
        public void StringStartsWithFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.StartsWith,
                Value      = "brown fox"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #18
0
        public void StringEndsWithFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.EndsWith,
                Value      = "invaliddata"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #19
0
        public void IntegerGreaterThan()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.GreaterThan,
                Value      = "30"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Integer"));
        }
Beispiel #20
0
        public void StringEndsWithInsensitiveFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.EndsWith,
                Value      = "INVALIDDATA"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #21
0
        public void StringDoesNotContainInsensitive()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.DoesNotContain,
                Value      = "JASON"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Text"));
        }
Beispiel #22
0
        public void StringEqualToInsensitiveFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.EqualTo,
                Value      = "invaliddata"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #23
0
        public void IntegerNotEqualToFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.NotEqualTo,
                Value      = "42"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Integer"));
        }
Beispiel #24
0
        public void StringContainsInsensitive()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.Contains,
                Value      = "BROWN"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Text"));
        }
Beispiel #25
0
        public void StringEndsWith()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.EndsWith,
                Value      = "dog"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Text"));
        }
Beispiel #26
0
        public void StringIsNotBlankNullFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.IsNotBlank,
                Value      = string.Empty
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "NullText"));
        }
Beispiel #27
0
        public void DoubleNotEqualTo()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.NotEqualTo,
                Value      = "42.1"
            };

            Assert.That.IsTrue(filter.Evaluate(Sample, "Double"));
        }
Beispiel #28
0
        public void StringNotEqualToInsensitiveFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.NotEqualTo,
                Value      = Sample.Text.ToUpper()
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Text"));
        }
Beispiel #29
0
        public void DoubleLessThanFalse()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.LessThan,
                Value      = "41.4"
            };

            Assert.That.IsFalse(filter.Evaluate(Sample, "Double"));
        }
        public void IntegerEqualTo()
        {
            var filter = new ComparisonFilterExpression
            {
                Comparison = ComparisonType.EqualTo,
                Value      = "42"
            };

            Assert.True(filter.Evaluate(Sample, "Integer"));
        }