コード例 #1
0
        public void TestSQLColumnOutputAutoIncrement()
        {
            SQLColumn testColumn = new SQLColumn("testColumnName", System.Data.SqlDbType.Int, false, new Tuple <int, int>(1, 1));

            Assert.Equal("testColumnName Int IDENTITY(1,1) NOT NULL", testColumn.GetCreateSqlColumnInfo());
        }
コード例 #2
0
        public void TestSQLColumnOutputAll()
        {
            SQLColumn testColumn = new SQLColumn("testColumnName", System.Data.SqlDbType.Binary, 255, false, true, new Tuple <int, int>(1, 1));

            Assert.Equal("testColumnName Binary(255) IDENTITY(1,1) NOT NULL PRIMARY KEY", testColumn.GetCreateSqlColumnInfo());
        }
コード例 #3
0
        public void TestSQLColumnOutputPrimaryKey()
        {
            SQLColumn testColumn = new SQLColumn("testColumnName", System.Data.SqlDbType.Int, false, true);

            Assert.Equal("testColumnName Int NOT NULL PRIMARY KEY", testColumn.GetCreateSqlColumnInfo());
        }
コード例 #4
0
        public void TestSQLColumnOutputNull()
        {
            SQLColumn testColumn = new SQLColumn("testColumnName", System.Data.SqlDbType.Int, true);

            Assert.Equal("testColumnName Int NULL", testColumn.GetCreateSqlColumnInfo());
        }
コード例 #5
0
        public void TestSQLColumnOutputDecimalSetPrecision()
        {
            SQLColumn testColumn = new SQLColumn("testColumnName", System.Data.SqlDbType.Decimal, new Tuple <int, int>(4, 2));

            Assert.Equal("testColumnName Decimal(4,2) NOT NULL", testColumn.GetCreateSqlColumnInfo());
        }
コード例 #6
0
        public void TestSQLColumnOutputDecimalDefault()
        {
            SQLColumn testColumn = new SQLColumn("testColumnName", System.Data.SqlDbType.Decimal);

            Assert.Equal("testColumnName Decimal(18,2) NOT NULL", testColumn.GetCreateSqlColumnInfo());
        }
コード例 #7
0
        public void TestSQLColumnOutputVarCharSetLength()
        {
            SQLColumn testColumn = new SQLColumn("testColumnName", System.Data.SqlDbType.VarChar, 255);

            Assert.Equal("testColumnName VarChar(255) NOT NULL", testColumn.GetCreateSqlColumnInfo());
        }