Exemple #1
0
        public DbUpScriptExecution_Tests()
        {
            _connection = new Mock <IConnectionManager>();
            var conf = FLywayTestBuilder.BuildFlywayConf();

            _exec = new DbUpSqlScriptRunner(_connection.Object, conf);
        }
Exemple #2
0
 public FlywayUpdater_Tests()
 {
     _exec = new Mock <IFlywayScriptRunner>();
     _exec.Setup(x => x.Run(
                     It.IsAny <IEnumerable <SqlScript> >(),
                     It.IsAny <IEnumerable <SqlScript> >(),
                     It.IsAny <IEnumerable <SqlScript> >(),
                     It.IsAny <IEnumerable <SqlScript> >(),
                     It.IsAny <IJournal>()
                     )).Returns <IEnumerable <SqlScript>
                                 , IEnumerable <SqlScript>
                                 , IEnumerable <SqlScript>
                                 , IEnumerable <SqlScript>
                                 , IJournal>(
         (x1, x2, x3, x4, j) => new DatabaseUpgradeResult(x1, true, null)
         );
     _exec.Setup(x => x.RunHashed(
                     It.IsAny <IEnumerable <SqlScript> >(),
                     It.IsAny <IEnumerable <SqlScript> >(),
                     It.IsAny <IEnumerable <SqlScript> >(),
                     It.IsAny <IEnumerable <SqlScript> >()
                     )).Returns <IEnumerable <SqlScript>
                                 , IEnumerable <SqlScript>
                                 , IEnumerable <SqlScript>
                                 , IEnumerable <SqlScript> >(
         (x1, x2, x3, x4) => new DatabaseUpgradeResult(x1, true, null)
         );
     _updater = FLywayTestBuilder.BuildFlywayUpdater(exec: _exec.Object);
 }
Exemple #3
0
        public FlywaySqlConf_Value_Tests()
        {
            var values = new Dictionary <string, string>()
            {
                { "Url", "server=.;database=test" },
                { "User", "user" },
                { "Password", "password" },
            };

            _conf = FLywayTestBuilder.BuildFlywayConf(values);
        }
Exemple #4
0
        protected FlywayCallbacks BuildCallbacks()
        {
            var provider = FLywayTestBuilder.BuildFlywayFileProvider();

            return(new FlywayCallbacks(provider));
        }
Exemple #5
0
 public FlywayFileProvider_Tests()
 {
     _provider = FLywayTestBuilder.BuildFlywayFileProvider();
 }
Exemple #6
0
        public FlywaySqlConf_Default_Tests()
        {
            var values = new Dictionary <string, string>();

            _conf = FLywayTestBuilder.BuildFlywayConf(values);
        }