public void ProduceValidSqlQuery_With_SelectSpecificColumnUsingFromWithoutAlias(IEnumerable <string> inputColumns, string inputTable, string expected) { ICanCallAfterSqlBuilder builder = Dsl.PlainSql(); ICanCallAfterSelectColumn afterSelectColumn = null; foreach (string column in inputColumns) { afterSelectColumn = builder.SelectColumn(column); } string result = afterSelectColumn.From(inputTable).WithoutAlias().ToSql(); Assert.Equal($"{expected}", result); }
public void ProduceValidSqlQuery_With_SelectSpecificColumnUsingDefaultFrom(IEnumerable <string> inputColumns, string tableName, string expected) { ICanCallAfterSqlBuilder builder = Dsl.PlainSql(); ICanCallAfterSelectColumn afterSelectColumn = null; foreach (string column in inputColumns) { afterSelectColumn = builder.SelectColumn(column); } string result = afterSelectColumn.From(tableName).ToSql(); Assert.Equal(expected, result); }