public void RunMigrator() { _workingDirectoryManager.Create(); var steps = _migrationSelector.SelectMigrations(); if (_migrationRunner.CanMigrate(steps)) { _migrationRunner.Migrate(steps); } }
public void RunMigrator_CanMigrate_RunsMigrations() { using (_mocks.Record()) { SetupResult.For(_migrationSelector.SelectMigrations()).Return(_steps); _workingDirectoryManager.Create(); SetupResult.For(_migrationRunner.CanMigrate(_steps)).Return(true); _migrationRunner.Migrate(_steps); } _target.RunMigrator(); _mocks.VerifyAll(); }