コード例 #1
0
        public void SetUp()
        {
            IDbmsSyntax syntax = null;
            QueryExecuter nullExecuter = null;

            var factory = new Mock<DbmsFactory>("mssql", string.Empty);
            factory.Setup(f => f.CreateConnection()).Returns(new Mock<IDbConnection>().Object);
            factory.Setup(f => f.CreateDbmsSyntax()).Returns(syntax);

            this.queryExecuter = new Mock<QueryExecuter>(factory.Object);
            
            this.schemaVersionManager = new Mock<DatabaseSchemaVersionManager>(nullExecuter, syntax, "empty");

            this.splitter = new Mock<QueryStatementSplitter>();

            this.applier = new DirectToDbApplierAccessor(
                this.queryExecuter.Object,
                this.schemaVersionManager.Object,
                this.splitter.Object,
                System.Console.Out);
        }
コード例 #2
0
        public void SetUp()
        {
            IDbmsSyntax   syntax       = null;
            QueryExecuter nullExecuter = null;

            var factory = new Mock <DbmsFactory>("mssql", string.Empty);

            factory.Setup(f => f.CreateConnection()).Returns(new Mock <IDbConnection>().Object);
            factory.Setup(f => f.CreateDbmsSyntax()).Returns(syntax);

            this.queryExecuter = new Mock <QueryExecuter>(factory.Object);

            this.schemaVersionManager = new Mock <DatabaseSchemaVersionManager>(nullExecuter, syntax, "empty", false);

            this.splitter = new Mock <QueryStatementSplitter>();

            this.applier = new DirectToDbApplierAccessor(
                this.queryExecuter.Object,
                this.schemaVersionManager.Object,
                this.splitter.Object,
                System.Console.Out);
        }