public void CAMLBuilder_SingleExpression() { var expression = GetSinglExpression(); var builder = new CAMLBuilder(expression); var checkString = GetSingleCheckString(expression); Assert.IsTrue(builder.ToString().Equals(checkString)); }
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)); }
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)); }