public void Dispatches_visitor() { var renameIndexOperation = new RenameIndexOperation("dbo.MyTable", "MyIndex", "MyIndex2"); var mockVisitor = MigrationsTestHelpers.MockSqlGenerator(); var builder = new Mock <SqlBatchBuilder>(); renameIndexOperation.GenerateSql(mockVisitor.Object, builder.Object); mockVisitor.Verify(g => g.Generate(renameIndexOperation, builder.Object), Times.Once()); }
public void Dispatches_visitor() { var renameIndexOperation = new RenameIndexOperation("dbo.MyTable", "MyIndex", "MyIndex2"); var mockVisitor = new Mock <MigrationOperationSqlGenerator>(new RelationalTypeMapper()); var builder = new Mock <IndentedStringBuilder>(); renameIndexOperation.GenerateSql(mockVisitor.Object, builder.Object, false); mockVisitor.Verify(g => g.Generate(renameIndexOperation, builder.Object, false), Times.Once()); }