public void MusicWithoutMetaDataShouldDefaultToFilename() { var testFile = @"..\..\..\TestFiles\NoMetadata\NoMetadata.mp3"; var musicInfoReader = new MusicInfoReader(); var info = musicInfoReader.GetInfoForFile(testFile); Assert.AreEqual("NoMetadata", info.Title, "When the metadata is missing, the title must be the name of the file."); }
public void ReadTestMP3() { var testFilePath = @"..\..\..\TestFiles\one.mp3"; var artist = "awl"; var title = "one"; var album = "TestAlbum"; var trackNumber = 1; var musicInfoReader = new MusicInfoReader(); MusicInfo result = musicInfoReader.GetInfoForFile(testFilePath); Assert.AreEqual(title, result.Title, "The title must be correct."); Assert.AreEqual(artist, result.Artist, "The artist must be correct."); Assert.AreEqual(album, result.Album, "It must be for the correct album."); Assert.AreEqual(testFilePath, result.FullPath, "The full path must be correct."); Assert.AreEqual(trackNumber, result.TrackNumber, "The track number must be correct."); }