예제 #1
0
        public void GetSetSqlShouldThrowsExceptionIfParamsIsNullEmpty()
        {
            var dialect = new SqliteDialect();

            Assert.Throws <ArgumentNullException>("parameters", () =>
            {
                dialect.GetSetSql("select * from TestEntity", 1, 1, null);
            });
        }
예제 #2
0
        public void GetSetSql()
        {
            var dialect    = new SqliteDialect();
            var dictionary = new Dictionary <string, object>();

            Assert.Equal("select * from TestEntity LIMIT @Offset, @Count", dialect.GetSetSql("select * from TestEntity", 1, 2, dictionary));
            Assert.Equal(1, dictionary["@Offset"]);
            Assert.Equal(2, dictionary["@Count"]);
        }
예제 #3
0
        public void GetSetSqlShouldThrowsExceptionIfSqlIsNullOrEmpty(string sql)
        {
            var dialect = new SqliteDialect();

            Assert.Throws <ArgumentNullException>("sql", () =>
            {
                dialect.GetSetSql(sql, 1, 1, null);
            });
        }