public void ProduceValidSqlQuery_With_SelectAllColumnsFromATableWithoutAlias() { ICanCallAfterSqlBuilder builder = Dsl.PlainSql(); string result = builder.SelectAllColumns().From(TableName).WithoutAlias().ToSql(); Assert.Equal($"SELECT * {DefaultFromWithoutAlias}", result); }
public void ProduceValidSqlQuery_WithWhereClause_AlphanumericEqual(string inputColumn, string inputValue, string expected) { ICanCallAfterSqlBuilder builder = Dsl.PlainSql(); string result = builder.SelectAllColumns().From(TableName).Where(inputColumn).IsEqualTo(inputValue).ToSql(); Assert.Equal($"{DefaulSelectFromWithWhere} {expected}", result); }
public void ProduceValidSqlQuery_With_AndIsEqualClause(string whereColumn, string whereValue, string andColumn, string andValue, string expected) { ICanCallAfterSqlBuilder builder = Dsl.PlainSql(); string result = builder.SelectAllColumns().From(TableName).Where(whereColumn).IsEqualTo(whereValue).And(andColumn).IsEqualTo(andValue).ToSql(); Assert.Equal($"{DefaulSelectFromWithWhere} {expected}", result); }