コード例 #1
0
        public DatabaseMigrationSelectorTests()
        {
            migrationRegistry = Substitute.For <IDatabaseMigrationRegistry>();
            migrationProvider = Substitute.For <IDatabaseMigrationProvider>();

            sut = new DatabaseMigrationSelector(migrationRegistry, migrationProvider);
        }
コード例 #2
0
 public DatabaseMigrationSelector(IDatabaseMigrationRegistry migrationRegistry, IDatabaseMigrationProvider migrationProvider,
                                  IDatabaseMigrationSelectorOptions selectorOptions)
 {
     this.migrationRegistry = migrationRegistry;
     this.migrationProvider = migrationProvider;
     this.selectorOptions   = selectorOptions;
 }
コード例 #3
0
        public DatabaseMigrationSelectorTests()
        {
            migrationRegistry = Substitute.For <IDatabaseMigrationRegistry>();
            migrationProvider = Substitute.For <IDatabaseMigrationProvider>();
            selectorOptions   = Substitute.For <IDatabaseMigrationSelectorOptions>();
            selectorOptions.RerunRepeatableMigrationsOnDependencyUpdate.Returns(true);

            sut = new DatabaseMigrationSelector(migrationRegistry, migrationProvider, selectorOptions);
        }
コード例 #4
0
 public DatabaseMigrationExecutor(IDatabaseMigrationProvider[] migrationProviders,
                                  IDatabaseMigrationRegistry migrationRegistry,
                                  IDatabaseMigrationDiscovery[] migrationDiscoveries,
                                  IDatabaseMigrationSelector migrationSelector,
                                  IDatabaseMigrationExecutionOptions options)
 {
     this.migrationProviders   = migrationProviders;
     this.migrationRegistry    = migrationRegistry;
     this.migrationDiscoveries = migrationDiscoveries;
     this.migrationSelector    = migrationSelector;
     this.options = options;
 }
コード例 #5
0
        public DatabaseMigrationExecutorTests()
        {
            migrationProviders = new[]
            {
                Substitute.For <IDatabaseMigrationProvider>()
            };
            migrationProviders[0].GetProviderEnvironmentTags().Returns(new[] { "providerTag" });

            migrationRegistry    = Substitute.For <IDatabaseMigrationRegistry>();
            migrationDiscoveries = new[]
            {
                Substitute.For <IDatabaseMigrationDiscovery>()
            };

            migrationSelector = Substitute.For <IDatabaseMigrationSelector>();

            migrationExecutionOptions = Substitute.For <IDatabaseMigrationExecutionOptions>();
            migrationExecutionOptions.EnvironmentTags.Returns(new[] { "optionsTag" });

            sut = new DatabaseMigrationExecutor(migrationProviders,
                                                migrationRegistry, migrationDiscoveries, migrationSelector,
                                                migrationExecutionOptions);
        }
コード例 #6
0
 public DatabaseMigrationSelector(IDatabaseMigrationRegistry migrationRegistry, IDatabaseMigrationProvider migrationProvider)
 {
     this.migrationRegistry = migrationRegistry;
     this.migrationProvider = migrationProvider;
 }