public void TestGettingTheDiscTagsForACdStub()
        {
            var tagSource = new MusicBrainzTagSource(new MockMusicBrainzApi(), new MockCoverArtApi());

            var discTags = tagSource.GetTags(DummyData.AppelsEten.TableOfContents).ToList();

            Assert.That(discTags, Is.Not.Null);
            Assert.That(discTags.Count(), Is.EqualTo(1));

            var expectedAlbum = new AlbumIdentification
            {
                Id             = "S0liNSPBm5gjOHw9JtmPPDhXynI-", //Stub has a special Id
                AlbumArtist    = "Ketnet Band",
                AlbumTitle     = "Appels Eten",
                Year           = null,
                NumberOfTracks = 3
            };

            expectedAlbum.AddTrack(new TrackIdentification {
                Title = "Appels Eten q2", TrackNumber = 1
            });
            expectedAlbum.AddTrack(new TrackIdentification {
                Title = "Appels Eten Instrumental q2", TrackNumber = 2
            });
            expectedAlbum.AddTrack(new TrackIdentification {
                Title = "Appels Eten PB q2", TrackNumber = 3
            });

            AssertAlbum(discTags.First(), expectedAlbum);
        }
Пример #2
0
        public void TestReplaceNullTokens()
        {
            var output = new OutputLocationBuilder(@"c:\test", "track-{title}-{albumtitle}.mp3");

            var album = new AlbumIdentification();

            album.AddTrack(new TrackIdentification());

            var filename = output.PrepareOutput(album.Tracks.First());

            Assert.That(filename.FileName, Is.EqualTo(@"c:\test\track--.mp3"));
        }
Пример #3
0
        public void TestReplaceTokens()
        {
            var output = new OutputLocationBuilder(@"c:\test", @"track\{title}\{artist}-{tracknumber}\{genre}-{albumtitle}.{albumartist}-{numberoftracks}-{year}.mp3");

            var album = new AlbumIdentification
            {
                AlbumTitle     = "album title",
                AlbumArtist    = "album artist",
                NumberOfTracks = 25,
                Year           = "1854"
            };

            album.AddTrack(new TrackIdentification()
            {
                Title       = "title",
                Artist      = "artist",
                TrackNumber = 4,
                Genre       = "genre",
            });

            var filename = output.PrepareOutput(album.Tracks.First());

            Assert.That(filename.FileName, Is.EqualTo(@"c:\test\track\title\artist-04\genre-album title.album artist-25-1854.mp3"));
        }