public void TestPeteTitleNoMatch() { var testClass = new TestAbumFormatter(FormatterSettingsTests.GetDefaultSettings()); var title = "99 Ways to Die"; var result = testClass.TestTitleStartsWithTrackNumber(title); Assert.IsFalse(result); var newTitle = testClass.TestTrimTrackFromTitle(title); Assert.AreEqual(title, newTitle); }
public void TestPeteTitleMatches() { var testClass = new TestAbumFormatter(FormatterSettingsTests.GetDefaultSettings()); var title = "01 - This is the track title"; var result = testClass.TestTitleStartsWithTrackNumber(title); Assert.IsTrue(result); var newTitle = testClass.TestTrimTrackFromTitle(title); Assert.AreEqual("This is the track title", newTitle); }
public void TestAlbumFileReader_GetExtraTracks() { var settings = FormatterSettingsTests.GetDefaultSettings(); var path = Path.Combine(settings.SourceDirectoryPath, "Ride", "Going Blank Again"); var albumReader = new AlbumFileReader(path); var artFiles = albumReader.GetAdditionalFiles(); var albumArt = (from FileInfo file in artFiles where file.Name.Equals("folder.jpg", StringComparison.CurrentCultureIgnoreCase) select file).FirstOrDefault(); Assert.IsNotNull(albumArt); }
public void TestAlbumFileReader_GetTracks() { var settings = FormatterSettingsTests.GetDefaultSettings(); var path = Path.Combine(settings.SourceDirectoryPath, "Ride", "Going Blank Again"); var albumReader = new AlbumFileReader(path); var tracks = albumReader.GetAlbumTracks(); Assert.AreEqual(2, tracks.Count); foreach (IMp3 track in tracks) { Assert.AreEqual("1992", track.Year); } }
public void TestFacade_WriteAlbumsGavStyleNoFix() { var settings = FormatterSettingsTests.GetDefaultSettings(); settings.Format = FormatStyle.Gav; settings.FixTags = false; settings.CopyOrMove = CopyType.Copy; var log = new TestLogObject(); var facade = new Mp3FormatterFacade(settings); facade.ProcessLog = log; facade.Process(); }
public void TestFacade_WriteAlbumsPeteStyleWithFix() { var settings = FormatterSettingsTests.GetDefaultSettings(); settings.Format = FormatStyle.Pete; settings.FixTags = true; settings.CopyOrMove = CopyType.Copy; var log = new TestLogObject(); var facade = new Mp3FormatterFacade(settings); facade.ProcessLog = log; facade.Process(); var mp3 = GetFile("Von Hertzen Brothers - 2013 - Nine Lives\\02-vhb-flowers_and_rust.mp3"); Assert.AreEqual("Von Hertzen Brothers", mp3.AlbumArtist); }
public static FormatterSettings GetDefaultSettings() { var testSettings = new FormatterSettingsTests(); return(testSettings.GetADefaultSettingsObject()); }
public void Setup() { _settings = FormatterSettingsTests.GetDefaultSettings(); }
public void Setup() { _settings = FormatterSettingsTests.GetDefaultSettings(); //var outDir = new DirectoryInfo(_settings.OutputDirectoryPath); }