public void SkipOldScriptsThatAreNotExecuted_SubfoldersAndNumericSort() { var oldIndex = CreateScriptsFromTags("s2, s5"); var newScripts = CreateTestScripts(@"s1:1\9\c, s2:1\10\b, s3:1\11\a, s4:1\99\c, s5:1\100\b, s6:1\101\a"); var dataMigrationAccessor = new DataMigrationScriptsExecuterAccessor(); List <DataMigrationScript> skippedOldUnexecutesScripts = dataMigrationAccessor.FindSkipedScriptsInEachPackage(oldIndex, newScripts); Assert.AreEqual("s1, s3, s4", TestUtility.DumpSorted(skippedOldUnexecutesScripts, s => s.Tag)); }
private static string GetSkipped(string executedScript, string newScriptsText) { var oldIndex = CreateScriptsFromTags(executedScript); var newScripts = CreateTestScripts(newScriptsText); var dataMigrationAccessor = new DataMigrationScriptsExecuterAccessor(); List <DataMigrationScript> skippedOldUnexecutesScripts = dataMigrationAccessor.FindSkipedScriptsInEachPackage(oldIndex, newScripts); return(TestUtility.DumpSorted(skippedOldUnexecutesScripts, s => s.Tag)); }
public void SkipOldScriptsThatAreNotExecuted() { var oldIndex = CreateScriptsFromTags("s2, s4, s6"); var newScripts = CreateTestScripts(@"s1:1\0001, s2:1\0002, s3:1\0003, s4:2\0005, s5:2\0006, s6:2\0007"); var dataMigrationAccessor = new DataMigrationScriptsExecuterAccessor(); List <DataMigrationScript> skippedOldUnexecutesScripts = dataMigrationAccessor.FindSkipedScriptsInEachPackage(oldIndex, newScripts); Assert.AreEqual("s1, s5", TestUtility.DumpSorted(skippedOldUnexecutesScripts, s => s.Tag)); }