public SoodaOrderBy(string columnName, SortOrder sortOrder) { SoodaObjectExpressionComparer ec = new SoodaObjectExpressionComparer(); ec.AddExpression(SoqlParser.ParseExpression(columnName), sortOrder); _comparer = ec; }
private void AssertExpression(string s, object expectedValue) { SoqlExpression expr = SoqlParser.ParseExpression(s); SoqlPrettyPrinter pp = new SoqlPrettyPrinter(Console.Out); pp.PrintExpression(expr); object val = expr.Evaluate(null); Console.WriteLine(" = {0} (expected {1})", val, expectedValue); Assert.AreEqual(expectedValue, val); }