Exemplo n.º 1
0
        private string GetThreeChainString(CAMLChainedExpression chain)
        {
            var expression = chain.Expressions[0];

            return(String.Format(@"<Where><{0}><{0}>{1}{1}</{0}>{1}</{0}></Where>",
                                 chain.Condition,
                                 GetSingleString(expression)));
        }
Exemplo n.º 2
0
        public void CAMLBuilder_Chained_3_Expression()
        {
            var expression = GetSinglExpression() as CAMLExpression;
            var chain      = new CAMLChainedExpression
            {
                Condition   = CAMLCondition.And,
                Expressions = new List <CAMLExpression> {
                    expression, expression, expression
                }
            };
            var builder     = new CAMLBuilder(chain);
            var checkString = GetThreeChainString(chain);

            Assert.IsTrue(builder.ToString().Equals(checkString));
        }
Exemplo n.º 3
0
        public void CAMLBuilder_Chained_2_Expression()
        {
            var expression = GetSinglExpression() as CAMLExpression;
            var chain      = new CAMLChainedExpression
            {
                Condition   = CAMLCondition.And,
                Expressions = new List <CAMLExpression> {
                    expression, expression
                }
            };
            var builder     = new CAMLBuilder(chain);
            var checkString = String.Format(@"<Where><{0}>{1}{1}</{0}></Where>",
                                            chain.Condition,
                                            GetSingleString(expression));

            Assert.IsTrue(builder.ToString().Equals(checkString));
        }