public void EmptyFile() { var fileName = "FavoriteMappers_Empty.ini"; var filePath = Path.Combine(DataPath, fileName); Assert.IsTrue(File.Exists(filePath)); var favoriteMappers = new FavoriteMappers(filePath); favoriteMappers.Initialize(); Assert.AreEqual(0, favoriteMappers.Mappers.Count); }
public void NonexistantFile() { var fileName = "FavoriteMappers_DoesntExist.ini"; var filePath = Path.Combine(DataPath, fileName); Assert.IsFalse(File.Exists(filePath)); var favoriteMappers = new FavoriteMappers(filePath); favoriteMappers.Initialize(); Assert.AreEqual(0, favoriteMappers.Mappers.Count); }
//private TransformBlock<PlaylistSong, JobResult> DownloadBatch; public SongDownloader(PluginConfig config, HistoryManager historyManager, SongHasher hashSource, string customLevelsPath) { CustomLevelsPath = customLevelsPath; Directory.CreateDirectory(CustomLevelsPath); HashSource = hashSource; DownloadQueue = new ConcurrentQueue <PlaylistSong>(); HistoryManager = historyManager; FavoriteMappers = new FavoriteMappers(); FavoriteMappers.Initialize(); Config = config.Clone(); }
public void NewLineAtMiddle() { var fileName = "FavoriteMappers_NewLineAtMiddle.ini"; var filePath = Path.Combine(DataPath, fileName); Assert.IsTrue(File.Exists(filePath)); var favoriteMappers = new FavoriteMappers(filePath); favoriteMappers.Initialize(); Assert.AreEqual(6, favoriteMappers.Mappers.Count); foreach (var mapper in DefaultMappers) { Assert.IsTrue(favoriteMappers.Mappers.Contains(mapper)); } }