Esempio n. 1
0
        public void Dispatches_visitor()
        {
            var createSequenceOperation = new CreateSequenceOperation("dbo.MySequence");
            var mockVisitor             = MigrationsTestHelpers.MockSqlGenerator();
            var builder = new Mock <SqlBatchBuilder>();

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

            mockVisitor.Verify(g => g.Generate(createSequenceOperation, builder.Object), Times.Once());
        }
        public void Dispatches_visitor()
        {
            var createSequenceOperation = new CreateSequenceOperation(new Sequence("dbo.MySequence"));
            var mockVisitor             = new Mock <MigrationOperationSqlGenerator>(new RelationalTypeMapper());
            var builder = new Mock <IndentedStringBuilder>();

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

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