private void GenerateStatementOrderBy(OrderBy.OrderBy orderBy, TextWriter writer, CodeGeneratorOptions options) { if (orderBy != null) { writer.Write("ORDER BY "); foreach (var expression in orderBy.OrderByExpressions) { GenerateCodeFromExpression(expression.Expression, writer, options); if (!string.IsNullOrEmpty(expression.CollationName)) { writer.Write(string.Concat(" COLLATE ", expression.CollationName)); } if (expression.SortOrder != SortOrder.Asc) { writer.Write(" DESC"); } } } }
public void SelectTest6() { var table = new Table("test"); var orderByExpression = table["foo"].Asc(); OrderBy.OrderBy target = new OrderBy.OrderBy(orderByExpression); Top top = null; // TODO: Initialize to an appropriate value List<Expression> selectList = null; // TODO: Initialize to an appropriate value Select.Select expected = null; // TODO: Initialize to an appropriate value Select.Select actual; actual = target.Select(top, selectList); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void SelectTest1() { var table = new Table("test"); var orderByExpression = table["foo"].Asc(); OrderBy.OrderBy target = new OrderBy.OrderBy(orderByExpression); Column[] selectedItems = new Column[] { table["foo"] }; From.From from = new From.From(table); Select.Select expected = new Select.Select(selectedItems, from, target); Select.Select actual; actual = target.Select(selectedItems); Assert.AreEqual(target, actual.OrderBy); }
public void SelectTest() { var table = new Table("test"); var orderByExpression = table["foo"].Asc(); OrderBy.OrderBy target = new OrderBy.OrderBy(orderByExpression); Expression selectItem = table["foo"]; From.From from = new From.From(table); Select.Select expected = new Select.Select(selectItem, from, target); // TODO: Initialize to an appropriate value Select.Select actual = target.Select(selectItem); Assert.AreEqual(target, actual.OrderBy); }
public void OrderByExpressionsTest() { var table = new Table("test"); var orderByExpression = table["foo"].Asc(); OrderBy.OrderBy target = new OrderBy.OrderBy(orderByExpression); List<OrderByExpression> actual; actual = target.OrderByExpressions; Assert.Inconclusive("Verify the correctness of this test method."); }
public void OrderByConstructorTest6() { List<OrderByExpression> orderByExpressions = null; // TODO: Initialize to an appropriate value OrderBy.OrderBy target = new OrderBy.OrderBy(orderByExpressions); Assert.Inconclusive("TODO: Implement code to verify target"); }