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