public void RollsBackAllScriptsPlannedInOrder() { scriptStore.Add(new Script("001", "AAA", "BBB")); scriptStore.Add(new Script("002", "CCC", "DDD")); scriptStore.Add(new Script("003", "EEE", "FFF")); RecordPriorDeployment("001"); RecordPriorDeployment("002"); RecordPriorDeployment("003"); string[] plan = new[] { "003", "002", "001" }; rollbacker.Execute(plan); CollectionAssert.AreEqual(new[] { "FFF", "DDD", "BBB" }, database.AppliedScripts); }
private void AddScriptToStore(string name) { scriptStore.Add(new Script(name, "ABC", "DEF")); }
public void DeploysAllScriptsPlannedInOrder() { scriptStore.Add(new Script("001", "AAA", "BBB")); scriptStore.Add(new Script("002", "CCC", "DDD")); scriptStore.Add(new Script("003", "EEE", "FFF")); string[] plan = new[] { "001", "002", "003" }; deployer.Execute(plan); CollectionAssert.AreEqual(new[] { "AAA", "CCC", "EEE" }, database.AppliedScripts); }