예제 #1
0
        public void Dispatches_visitor()
        {
            var createDatabaseOperation = new CreateDatabaseOperation("MyDatabase");
            var mockVisitor             = MigrationsTestHelpers.MockSqlGenerator();
            var builder = new Mock <SqlBatchBuilder>();

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

            mockVisitor.Verify(g => g.Generate(createDatabaseOperation, builder.Object), Times.Once());
        }
예제 #2
0
        public void Dispatches_visitor()
        {
            var createDatabaseOperation = new CreateDatabaseOperation("MyDatabase");
            var mockVisitor             = new Mock <MigrationOperationSqlGenerator>(new RelationalTypeMapper());
            var builder = new Mock <IndentedStringBuilder>();

            createDatabaseOperation.GenerateSql(mockVisitor.Object, builder.Object, false);

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