コード例 #1
0
        public void TestArtistReader_GetCommonArtist()
        {
            var artist           = TestAlbumFileReader.GetFNM();
            var commonFromArtist = ArtistReader.GetMostCommonArtistNameFromAlbums(artist);

            Assert.AreEqual("Faith No More", commonFromArtist);
        }
コード例 #2
0
        public void TestStandardiseFacade()
        {
            var artist = TestAlbumFileReader.GetFNM();
            var facade = new Mp3StandardiseFacade(_settings);

            facade.StandardiseArtist(artist);

            var albumOfTheYear = artist.Albums[0];

            foreach (IMp3 mp3 in albumOfTheYear.Tracks())
            {
                Assert.AreEqual("Album Of The Year", mp3.Album);
                Assert.AreEqual("Faith No More", mp3.Artist);
                Assert.AreEqual("Faith No More", mp3.AlbumArtist);
                Assert.AreEqual("1997", mp3.Year);
            }

            var angelDust = artist.Albums[1];

            foreach (IMp3 mp3 in angelDust.Tracks())
            {
                Assert.AreEqual("Angel Dust", mp3.Album);
                Assert.AreEqual("Faith No More", mp3.Artist);
                Assert.AreEqual("Faith No More", mp3.AlbumArtist);
                Assert.AreEqual("1992", mp3.Year);
            }
        }