public virtual void TestShouldIgnoreIncompleteMpegFrame() { Mp3File mp3File = new Mp3File(MP3_WITH_INCOMPLETE_MPEG_FRAME, 256); Assert.AreEqual(unchecked((int)(0x44B)), mp3File.GetXingOffset()); Assert.AreEqual(unchecked((int)(0x5EC)), mp3File.GetStartOffset()); Assert.AreEqual(unchecked((int)(0xF17)), mp3File.GetEndOffset()); Assert.IsTrue(mp3File.HasId3v1Tag()); Assert.IsTrue(mp3File.HasId3v2Tag()); Assert.AreEqual(5, mp3File.GetFrameCount()); }
public virtual void TestShouldRemoveCustomTag() { string filename = MP3_WITH_ID3V1_AND_ID3V23_AND_CUSTOM_TAGS; string saveFilename = filename + ".copy"; try { Mp3File mp3File = new Mp3File(filename); mp3File.RemoveCustomTag(); mp3File.Save(saveFilename); Mp3File newMp3File = new Mp3File(saveFilename); Assert.IsTrue(newMp3File.HasId3v1Tag()); Assert.IsTrue(newMp3File.HasId3v2Tag()); Assert.IsFalse(newMp3File.HasCustomTag()); } finally { TestHelper.DeleteFile(saveFilename); } }
public virtual void TestShouldInitialiseProperlyWhenNotScanningFile() { Mp3File mp3File = new Mp3File(MP3_WITH_INCOMPLETE_MPEG_FRAME, 256, false); Assert.IsTrue(mp3File.HasId3v1Tag()); Assert.IsTrue(mp3File.HasId3v2Tag()); }