示例#1
0
        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);
        }
示例#2
0
 private void AddScriptToStore(string name)
 {
     scriptStore.Add(new Script(name, "ABC", "DEF"));
 }
示例#3
0
        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);
        }