public void AddDefaultConstraint_adds_operation() { var builder = new MigrationBuilder(); builder.AddDefaultConstraint("dbo.MyTable", "Foo", DefaultConstraint.Value(5)); Assert.Equal(1, builder.Operations.Count); Assert.IsType <AddDefaultConstraintOperation>(builder.Operations[0]); var operation = (AddDefaultConstraintOperation)builder.Operations[0]; Assert.Equal("dbo.MyTable", operation.TableName); Assert.Equal("Foo", operation.ColumnName); Assert.Equal(5, operation.DefaultValue); }
public void AddDefaultConstraint_adds_operation() { var builder = new MigrationBuilder(); builder.AddDefaultConstraint("dbo.MyTable", "Foo", DefaultConstraint.Value(5)); Assert.Equal(1, builder.Operations.Count); Assert.IsType<AddDefaultConstraintOperation>(builder.Operations[0]); var operation = (AddDefaultConstraintOperation)builder.Operations[0]; Assert.Equal("dbo.MyTable", operation.TableName); Assert.Equal("Foo", operation.ColumnName); Assert.Equal(5, operation.DefaultValue); }