コード例 #1
0
        public void GetSetSqlShouldThrowsExceptionIfParamsIsNullEmpty()
        {
            var dialect = new SqlServerDialect();

            Assert.Throws <ArgumentNullException>("parameters", () =>
            {
                dialect.GetSetSql("select * from TestEntity", 1, 1, null);
            });
        }
コード例 #2
0
        public void GetSqlShouldThrowsExceptionIfQueryIsNotSelectStatement()
        {
            var dialect = new SqlServerDialect();

            Assert.Throws <ArgumentException>("sql", () =>
            {
                dialect.GetSetSql("update TestEntity set name = 'Alex'", 1, 1, new Dictionary <string, object>());
            });
        }
コード例 #3
0
        public void GetSetSqlShouldThrowsExceptionIfSqlIsNullOrEmpty(string sql)
        {
            var dialect = new SqlServerDialect();

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