public void When_deleting_Then_builds_properly()
        {
            var statement = SqlStatements.Delete()
                            .From("Users")
                            .Where("u.IsCool = TRUE")
                            .Where("u.Name LIKE @Query");

            var sql = statement.ToSql();

            sql.Should().BeEquivalentToIgnoringNewLines(@"DELETE Users
WHERE
    u.IsCool = TRUE AND
    u.Name LIKE @Query");
        }
Beispiel #2
0
        public void When_deleting_Then_builds_properly()
        {
            var statement = SqlStatements.Delete()
                            .From("Users")
                            .Where("u.IsCool = TRUE")
                            .Where("u.Name LIKE @Query");

            var sql = statement.ToSql();

            Assert.That(
                sql,
                SqlCompareConstraint.EqualTo(@"DELETE Users
WHERE
    u.IsCool = TRUE AND
    u.Name LIKE @Query"));
        }