예제 #1
0
        public void Dispatches_visitor()
        {
            var renameTableOperation = new RenameTableOperation("dbo.MyTable", "MyTable2");
            var mockVisitor          = new Mock <MigrationOperationSqlGenerator>(new RelationalTypeMapper());
            var builder = new Mock <IndentedStringBuilder>();

            renameTableOperation.GenerateSql(mockVisitor.Object, builder.Object);

            mockVisitor.Verify(g => g.Generate(renameTableOperation, builder.Object), Times.Once());
        }
        public void Dispatches_visitor()
        {
            var renameTableOperation = new RenameTableOperation("dbo.MyTable", "MyTable2");
            var mockVisitor          = MigrationsTestHelpers.MockSqlGenerator();
            var builder = new Mock <SqlBatchBuilder>();

            renameTableOperation.GenerateSql(mockVisitor.Object, builder.Object);

            mockVisitor.Verify(g => g.Generate(renameTableOperation, builder.Object), Times.Once());
        }