public virtual void TestShouldExtractGenreNumberFromCombinedGenreStringsCorrectly() { ID3v2TagTest.ID3v23TagForTesting id3tag = new ID3v2TagTest.ID3v23TagForTesting(this); try { id3tag.ExtractGenreNumber(string.Empty); Assert.Fail("NumberFormatException expected but not thrown"); } catch (FormatException) { } // expected Assert.AreEqual(13, id3tag.ExtractGenreNumber("13")); Assert.AreEqual(13, id3tag.ExtractGenreNumber("(13)")); Assert.AreEqual(13, id3tag.ExtractGenreNumber("(13)Pop")); }
public virtual void TestShouldExtractGenreDescriptionFromCombinedGenreStringsCorrectly() { ID3v2TagTest.ID3v23TagForTesting id3tag = new ID3v2TagTest.ID3v23TagForTesting(this); Assert.IsNull(id3tag.ExtractGenreDescription(string.Empty)); Assert.AreEqual(string.Empty, id3tag.ExtractGenreDescription("(13)")); Assert.AreEqual("Pop", id3tag.ExtractGenreDescription("(13)Pop")); }