Exemplo n.º 1
0
   public MigrationRunner(IMigrationFactoryChooser migrationFactoryChooser, IMigrationInitializer migrationInitializer,
 ISchemaStateManager schemaStateManager, IConfiguration configuration, ITransactionProvider transactionProvider)
   {
       _schemaStateManager = schemaStateManager;
         _transactionProvider = transactionProvider;
         _configuration = configuration;
         _migrationInitializer = migrationInitializer;
         _migrationFactoryChooser = migrationFactoryChooser;
   }
Exemplo n.º 2
0
 public MigrationRunner(IMigrationFactoryChooser migrationFactoryChooser, IMigrationInitializer migrationInitializer,
                        ISchemaStateManager schemaStateManager, IConfiguration configuration, ITransactionProvider transactionProvider)
 {
     _schemaStateManager      = schemaStateManager;
     _transactionProvider     = transactionProvider;
     _configuration           = configuration;
     _migrationInitializer    = migrationInitializer;
     _migrationFactoryChooser = migrationFactoryChooser;
 }
Exemplo n.º 3
0
   public Migrator(IMigrationSelector migrationSelector, IMigrationRunner migrationRunner,
 IDatabaseProvider databaseProvider, ISchemaStateManager schemaStateManager,
 IWorkingDirectoryManager workingDirectoryManager)
   {
       _migrationSelector = migrationSelector;
         _workingDirectoryManager = workingDirectoryManager;
         _schemaStateManager = schemaStateManager;
         _databaseProvider = databaseProvider;
         _migrationRunner = migrationRunner;
   }
Exemplo n.º 4
0
 public override Migrator Create()
 {
     _steps                   = new Dictionary <string, List <MigrationStep> >();
     _databaseProvider        = _mocks.DynamicMock <IDatabaseProvider>();
     _migrationSelector       = _mocks.DynamicMock <IMigrationSelector>();
     _schemaStateManager      = _mocks.DynamicMock <ISchemaStateManager>();
     _migrationRunner         = _mocks.StrictMock <IMigrationRunner>();
     _workingDirectoryManager = _mocks.StrictMock <IWorkingDirectoryManager>();
     return(new Migrator(_migrationSelector, _migrationRunner, _workingDirectoryManager));
 }
Exemplo n.º 5
0
 public override VersionStateFactory Create()
 {
     _configuration      = _mocks.DynamicMock <IConfiguration>();
     _schemaStateManager = _mocks.DynamicMock <ISchemaStateManager>();
     _migrations         = new List <MigrationReference>();
     _migrations.Add(new MigrationReference(1, "A", "001_a.cs"));
     _migrations.Add(new MigrationReference(2, "B", "002_b.cs"));
     _migrations.Add(new MigrationReference(3, "C", "003_c.cs"));
     _migrations.Add(new MigrationReference(4, "D", "004_d.cs"));
     return(new VersionStateFactory(_configuration, _schemaStateManager));
 }
 public override MigrationRunner Create()
 {
     _steps = new Dictionary <string, List <MigrationStep> >();
     _steps[string.Empty] = new List <MigrationStep>();
     _steps[string.Empty].Add(new MigrationStep(new MigrationReference(1, "A", "001_a.cs"), false));
     _steps[string.Empty].Add(new MigrationStep(new MigrationReference(2, "B", "002_b.cs"), false));
     _migration1              = _mocks.StrictMock <IDatabaseMigration>();
     _migration2              = _mocks.StrictMock <IDatabaseMigration>();
     _schemaStateManager      = _mocks.DynamicMock <ISchemaStateManager>();
     _migrationFactoryChooser = _mocks.DynamicMock <IMigrationFactoryChooser>();
     _migrationInitializer    = _mocks.DynamicMock <IMigrationInitializer>();
     _migrationFactory        = _mocks.DynamicMock <IMigrationFactory>();
     _configuration           = _mocks.DynamicMock <IConfiguration>();
     _transactionProvider     = _mocks.DynamicMock <ITransactionProvider>();
     _transaction             = _mocks.StrictMock <IDbTransaction>();
     return(new MigrationRunner(_migrationFactoryChooser, _migrationInitializer, _schemaStateManager, _configuration,
                                _transactionProvider));
 }
 public VersionStateFactory(IConfiguration configuration, ISchemaStateManager schemaStateManager)
 {
     _configuration      = configuration;
     _schemaStateManager = schemaStateManager;
 }
 public VersionStateFactory(IConfiguration configuration, ISchemaStateManager schemaStateManager)
 {
   _configuration = configuration;
   _schemaStateManager = schemaStateManager;
 }