Exemplo n.º 1
0
        public void GetCriteriaPredicateEnglish_NotEqualOperator()
        {
            var target = new CriteriaPredicate(_jsonANotEqualB);

            var Expected = "( A is not equal to B )";
            var Actual   = target.GetCriteriaPredicateEnglish();

            Assert.Equal(Expected, Actual);
        }
Exemplo n.º 2
0
        public void GetCriteriaPredicateSQL_LessThanOperator()
        {
            var target = new CriteriaPredicate(_jsonALessThanB);

            var Expected = "( A < B )";
            var Actual   = target.GetCriteriaPredicateSQL();

            Assert.Equal(Expected, Actual);
        }
Exemplo n.º 3
0
        public void GetCriteriaPredicateSQL_NotEqualOperator()
        {
            var target = new CriteriaPredicate(_jsonANotEqualB);

            var Expected = "( A != B )";
            var Actual   = target.GetCriteriaPredicateSQL();

            Assert.Equal(Expected, Actual);
        }
Exemplo n.º 4
0
        public void GetCriteriaPredicateEnglish_NotInListOperator()
        {
            var target = new CriteriaPredicate(_jsonANotInListBCD);

            var Expected = "( A is not in the list ( B, C, D ) )";
            var Actual   = target.GetCriteriaPredicateEnglish();

            Assert.Equal(Expected, Actual);
        }
Exemplo n.º 5
0
        public void GetCriteriaPredicateSQL_NotInListOperator()
        {
            var target = new CriteriaPredicate(_jsonANotInListBCD);

            var Expected = "( A NOT IN ( B, C, D ) )";
            var Actual   = target.GetCriteriaPredicateSQL();

            Assert.Equal(Expected, Actual);
        }
Exemplo n.º 6
0
        public void GetCriteriaPredicateEnglish_GreaterThanOrEqualOperator()
        {
            var target = new CriteriaPredicate(_jsonAGreaterThanOrEqualB);

            var Expected = "( A is greater than or equal to B )";
            var Actual   = target.GetCriteriaPredicateEnglish();

            Assert.Equal(Expected, Actual);
        }
Exemplo n.º 7
0
        public void CriteriaPredicate_InitializeWithOperators()
        {
            var target  = new CriteriaPredicate("A", CriteriaItemOperator.Equal, "B");
            var control = new CriteriaPredicate()
            {
                LeftSide = "A", CriteriaItemOperator = CriteriaItemOperator.Equal, RightSide = "B"
            };

            Assert.True(
                (control.LeftSide == target.LeftSide) &&
                (control.CriteriaItemOperator == target.CriteriaItemOperator) &&
                (control.RightSide == target.RightSide)
                , "Target and Control CriteriaPredicate properties differ");
        }