[Test] public void CheckRegisteredProtocolHandlers() { _manager.RegisterProtocolHandler("qwerty", "Simple Qwerty protocol", _plugin.Callback); IResourceList handlers = _manager.ProtocolHandlersList; Assert.AreEqual(1, handlers.Count); IResource handler = handlers[0]; Assert.AreEqual("qwerty", handler.GetStringProp(ProtocolHandlerManager.PROTOCOL)); Assert.AreEqual("Simple Qwerty protocol", handler.GetStringProp(ProtocolHandlerManager.FNAME)); Assert.AreEqual(false, handler.HasProp(ProtocolHandlerManager.DEFAULT)); _manager.SaveProtocolSettings(handler, "new name", true); handlers = _manager.ProtocolHandlersList; Assert.AreEqual(1, handlers.Count); handler = handlers[0]; Assert.AreEqual("qwerty", handler.GetStringProp(ProtocolHandlerManager.PROTOCOL)); Assert.AreEqual("new name", handler.GetStringProp(ProtocolHandlerManager.FNAME)); Assert.AreEqual(true, handler.HasProp(ProtocolHandlerManager.DEFAULT)); }
[Test] public void SaveProtocolSettings() { _manager.SaveProtocolSettings(null, "qwe", false); }