示例#1
0
 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());
 }
示例#2
0
 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);
     }
 }
示例#3
0
 public virtual void TestShouldInitialiseProperlyWhenNotScanningFile()
 {
     Mp3File mp3File = new Mp3File(MP3_WITH_INCOMPLETE_MPEG_FRAME, 256, false);
     Assert.IsTrue(mp3File.HasId3v1Tag());
     Assert.IsTrue(mp3File.HasId3v2Tag());
 }