DropDefaultConstraint() protected method

Call this method to generate SQL that will attempt to drop the default constraint created when a column is created. This method is usually called by code that overrides the creation or altering of columns.
protected DropDefaultConstraint ( string table, string column, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void
table string The table to which the constraint applies.
column string The column to which the constraint applies.
writer System.Data.Entity.Migrations.Utilities.IndentedTextWriter The writer to which generated SQL should be written.
return void
        public void DropDefaultConstraint_checks_its_arguments()
        {
            var generator = new SqlServerMigrationSqlGenerator();
            var writer = new IndentedTextWriter(new Mock<TextWriter>().Object);

            Assert.Equal(
                Strings.ArgumentIsNullOrWhitespace("table"),
                Assert.Throws<ArgumentException>(
                    () => generator.DropDefaultConstraint(null, "Spektor", writer)).Message);

            Assert.Equal(
                Strings.ArgumentIsNullOrWhitespace("column"),
                Assert.Throws<ArgumentException>(
                    () => generator.DropDefaultConstraint("Regina", null, writer)).Message);

            Assert.Equal(
                "writer",
                Assert.Throws<ArgumentNullException>(() => generator.DropDefaultConstraint("Regina", "Spektor", null)).ParamName);
        }