public virtual void AfterEach() { ScriptProvider = null; VersionTracker = null; ScriptExecutor = null; Log = null; DbUpgrader = null; }
public virtual void BeforeEach() { ScriptProvider = Substitute.For<IScriptProvider> (); VersionTracker = Substitute.For<IJournal> (); ScriptExecutor = Substitute.For<IScriptExecutor> (); ScriptPreprocessor = Substitute.For<IScriptPreprocessor>(); Log = Substitute.For<IUpgradeLog> (); var config = new UpgradeConfiguration(); config.ScriptPreprocessors.Add(ScriptPreprocessor); config.ScriptProviders.Add(ScriptProvider); config.ScriptExecutor = ScriptExecutor; config.Journal = VersionTracker; config.Log = Log; DbUpgrader = new UpgradeEngine(config); }
private void WhenDatabaseIsUpgraded() { upgradeEngine = upgradeEngineBuilder.Build(); upgradeResult = upgradeEngine.PerformUpgrade(); }
private void WhenCheckIfDatabaseUpgradeIsRequired() { upgradeEngine = upgradeEngineBuilder.Build(); isUpgradeRequired = upgradeEngine.IsUpgradeRequired(); }
public ScriptingUpgrader(UpgradeEngine engine) : this(engine, new Options()) { }
public ScriptingUpgrader(UpgradeEngine engine, Options options) { m_engine = engine; m_options = options; }
public Upgrader(Context context, IUpgradeLog upgradeLog) { _context = context; _upgradeEngine = CreateUpgradeEngine(_context, upgradeLog); }
private void WhenDatabaseIsUpgradedToVersion(ScriptVersion scriptVersion) { upgradeEngine = upgradeEngineBuilder.SetTargetVersion(scriptVersion).Build(); upgradeResult = upgradeEngine.PerformUpgrade(); }
private void GivenAnUpToDateDatabase() { var journal = GetJournal(); journal.StoreExecutedScript(scripts[0]); journal.StoreExecutedScript(scripts[1]); journal.StoreExecutedScript(scripts[2]); upgradeEngine = upgradeEngineBuilder.Build(); }
private void GivenAnOutOfDateDatabase() { upgradeEngine = upgradeEngineBuilder.Build(); }