示例#1
0
        public void ApplyToQuery_GreaterIntegerNullable_CorrectResultReturned()
        {
            var criteria = new NumericSearch();

            criteria.Property       = "IntegerNullable";
            criteria.TargetTypeName = typeof(SomeClass).AssemblyQualifiedName;

            criteria.SearchTerm = 10;
            criteria.Comparator = NumericComparators.Greater;

            Assert.Equal(2, criteria.ApplyToQuery(new Repository().GetQuery()).Count());
        }
示例#2
0
        public void ApplyToQuery_LessOrEqualInteger_CorrectResultReturned()
        {
            var criteria = new NumericSearch();

            criteria.Property       = "Integer";
            criteria.TargetTypeName = typeof(SomeClass).AssemblyQualifiedName;

            criteria.SearchTerm = 80;
            criteria.Comparator = NumericComparators.LessOrEqual;

            Assert.Equal(16, criteria.ApplyToQuery(new Repository().GetQuery()).Count());
        }