public void varchar_column_with_collation() { _col.Type = DbType.AnsiString; _col.Size = "12"; _col.Collate = "Latin_General_CI_AI"; _cw.Write(_col); Assert.Equal("[User Id] varchar(12) COLLATE Latin_General_CI_AI NOT NULL", _sb.ToString()); }
public void column_not_null_with_default_no_options() { var w = new SqlServerColumnWriter(_sb); _col.IsNullable = false; _col.DefaultValue = "0"; w.Write(_col); Assert.Equal("[User Id] bit NOT NULL DEFAULT 0", _sb.ToString()); }
public void column_with_identity_and_options() { var w = new SqlServerColumnWriter(_sb); _col.IsIdentity = true; _col.IsNullable = true; _col.Options.Add(SqlServerOptions.ColumnIs.Sparse()); w.Write(_col); Assert.Equal("[User Id] bit SPARSE NULL IDENTITY(1,1)", _sb.ToString()); }