예제 #1
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);
     }
 }
예제 #2
0
 public virtual void TestShouldThrowExceptionIfSavingMp3WithSameNameAsSourceFile()
 {
     Mp3File mp3file = new Mp3File(MP3_WITH_ID3V1_AND_ID3V23_AND_CUSTOM_TAGS);
     try
     {
         mp3file.Save(MP3_WITH_ID3V1_AND_ID3V23_AND_CUSTOM_TAGS);
         Assert.Fail("IllegalArgumentException expected but not thrown");
     }
     catch (ArgumentException e)
     {
         Assert.AreEqual("Save filename same as source filename", e.Message);
     }
 }