public void UriOverride_Fail() { string uri = "http://localhost/urioverride"; var factory = new ProxyFactory(); factory.AddEndpointAddressOverride <IUriOverride>(new Uri(uri)); var proxy = factory.Proxy <IUriOverride>(); Assert.AreEqual("test", proxy.TestMe("test")); }
public void UriOverride_Basic() { string uri = "http://localhost/urioverride"; using (var host = new ServiceHost(typeof(UriOverride), new Uri(uri))) { host.AddServiceEndpoint(typeof(IUriOverride), new WS2007HttpBinding(SecurityMode.None), uri); host.Open(); var factory = new ProxyFactory(); factory.AddEndpointAddressOverride <IUriOverride>(new Uri(uri)); var proxy = factory.Proxy <IUriOverride>(); Assert.AreEqual("test", proxy.TestMe("test")); } }