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); }