Beispiel #1
0
        public void WithNoLimitNorOffset()
        {
            // Arrange:
            var query = new Query(TableName);
            var ctx   = new SqlResult {
                Query = query, RawSql = SqlPlaceholder
            };

            // Act:
            compiler.ApplyLegacyLimit(ctx);

            // Assert:
            Assert.Equal(SqlPlaceholder, ctx.RawSql);
        }
Beispiel #2
0
        public void NoLimitNorOffset()
        {
            // Arrange:
            var query = new Query(TableName);
            var ctx   = new SqlResult {
                Query = query, RawSql = SqlPlaceholder
            };

            // Act & Assert:
            var result = compiler.CompileLimit(ctx);

            compiler.ApplyLegacyLimit(ctx, 0, 0);

            Assert.Null(result);
            Assert.Equal(SqlPlaceholder, ctx.RawSql);
        }