Exemplo n.º 1
0
 public void ShouldTrackExecutedScripts()
 {
     DbUpgrader
     .PerformUpgrade()
     .Scripts.ToList()
     .ForEach(script => VersionTracker.Received().StoreExecutedScript(script));
 }
Exemplo n.º 2
0
        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());
        }