public void ShouldTrackExecutedScripts() { DbUpgrader .PerformUpgrade() .Scripts.ToList() .ForEach(script => VersionTracker.Received().StoreExecutedScript(script)); }
public void ShouldExecuteCorrectScript() { var result = DbUpgrader.PerformUpgrade(); var expectedScript = AllScripts.Last(); ScriptExecutor.Received().Execute(expectedScript, Arg.Any <IDictionary <string, string> >()); VersionTracker.Received().StoreExecutedScript(expectedScript); Assert.AreEqual(expectedScript, result.Scripts.First()); }