Net.Sf.Dbdeploy.ControllerTest.AssertRunScripts C# (CSharp) Method

AssertRunScripts() private static method

Asserts the specified scripts where included in the ones to run in the specified order.
private static AssertRunScripts ( IList scripts ) : void
scripts IList The scripts.
return void
        private static void AssertRunScripts(IList<ChangeScript> scripts, params string[] expectedKeys)
        {
            Assert.Greater(scripts.Count, 0, "No scripts where found that should run.");

            for (int i = 0; i < expectedKeys.Length; i++)
            {
                Assert.Greater(scripts.Count, i, "More change scripts were expected to run.");
                Assert.AreEqual(expectedKeys[i], scripts[i].UniqueKey, "The expected script '{0}' was not next.", expectedKeys[i]);
            }

            Assert.AreEqual(expectedKeys.Length, scripts.Count, "More scripts where applied than should have been.");
        }
    }