コード例 #1
0
        public void RunMigrator()
        {
            _workingDirectoryManager.Create();
            var steps = _migrationSelector.SelectMigrations();

            if (_migrationRunner.CanMigrate(steps))
            {
                _migrationRunner.Migrate(steps);
            }
        }
コード例 #2
0
 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();
 }