예제 #1
0
        public SchemaMigrationExecutorTests()
        {
            LogHelper.Register(new ConsoleLogger(), "Default");
            _sb = new StringBuilder();
            _tasks = new List<IMigrationTask>();
            _tasks.Add(new Migration2(_sb));
            _tasks.Add(new InstallerTask(_sb));            
            _tasks.Add(new Migration1(_sb));
            var runner = new FakeRunner();

            _schema = new SchemaMigrationExecutor(runner, _tasks,"TestSchema");
        }
예제 #2
0
 public void two_versions_of_setup_Db_throws()
 {
     _tasks.Add(new InstallerTask());
     var s = new SchemaMigrationExecutor(new FakeRunner(), _tasks, "TestSchema");
     Assert.Throws<InvalidOperationException>(() => s.InstallSchema());
 }