예제 #1
0
        public void ReplaceInfoDict()
        {
            var editor = new TorrentEditor(new BEncodedDictionary());

            Assert.IsFalse(editor.CanEditSecureMetadata);
            Assert.Throws <InvalidOperationException> (() => editor.SetCustom("info", new BEncodedDictionary()));
        }
예제 #2
0
        public void ReplaceInfoDict()
        {
            var editor = new TorrentEditor(new BEncodedDictionary())
            {
                CanEditSecureMetadata = false
            };

            editor.SetCustom("info", new BEncodedDictionary());
        }
예제 #3
0
 //[ExpectedException (typeof (InvalidOperationException))]
 public void ReplaceInfoDict()
 {
     Assert.Catch <InvalidOperationException>(() => {
         var editor = new TorrentEditor(new BEncodedDictionary())
         {
             CanEditSecureMetadata = false
         };
         editor.SetCustom("info", new BEncodedDictionary());
     });
 }