public void UnpublishMethod() { var service = new Mock <IWebService>(); using var x = new Published(); x.Publish(new WebServiceContent { Address = "/myws", Method = "PUT", Factory = () => service.Object }); var combined = Published.CombinePathMethod("/myws", "PUT"); Assert.True(x.TryGetNode(combined, out _)); x.UnPublish("/myws", "PUT"); Assert.False(x.TryGetNode(combined, out _)); }