Esempio n. 1
0
            public void ProduceValidSqlQuery_With_SelectAllColumnsFromATableWithoutAlias()
            {
                ICanCallAfterSqlBuilder builder = Dsl.PlainSql();

                string result = builder.SelectAllColumns().From(TableName).WithoutAlias().ToSql();

                Assert.Equal($"SELECT * {DefaultFromWithoutAlias}", result);
            }
Esempio n. 2
0
            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);
            }
Esempio n. 3
0
            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);
            }