private static void AssertFileTestCase(string fileName, bool expected)
 {
     Assert.That(DatabaseMigrationFileInfo.IsFileMatch(new FileInfo(fileName)), Is.EqualTo(expected), string.Format("Expected to be {0} for file {1}", expected, fileName));
 }
Esempio n. 2
0
        /// <summary>
        /// Returns other SQL files in alphabetically order
        /// </summary>
        internal List <SqlFileInfo> FindOtherSqlFiles()
        {
            var allFilesInDirectory = _migrationDirectory.EnumerateFiles("*.*", SearchOption.TopDirectoryOnly).Where(x => SqlFileInfo.IsFileMatch(x) && !DatabaseMigrationFileInfo.IsFileMatch(x)).ToList();

            return(allFilesInDirectory.Select(x => new SqlFileInfo(x)).OrderBy(x => x.SqlFile.Name).ToList());
        }