示例#1
0
        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);
        }
示例#2
0
        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);
            }
        }
示例#5
0
        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();
        }
示例#6
0
        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);
        }
示例#7
0
 public void Setup()
 {
     _settings = FormatterSettingsTests.GetDefaultSettings();
 }
示例#8
0
 public void Setup()
 {
     _settings = FormatterSettingsTests.GetDefaultSettings();
     //var outDir = new DirectoryInfo(_settings.OutputDirectoryPath);
 }