private string GetCookieRun() { var client = new FunnyQuoteserviceLegacy(); var uri = "http://FunnyQuotesLegacyService" + new Uri(client.Url).AbsolutePath; client.Url = _dicoveryAddressResolver.LookupService(new Uri(uri)).ToString(); return(client.GetCookie()); }
public void LookupService_FindsService_ReturnsURI() { // Arrange IDiscoveryClient client = new TestDiscoveryClient(new TestServiceInstance(new Uri("http://foundit:5555"))); DiscoveryHttpClientHandler handler = new DiscoveryHttpClientHandler(client); Uri uri = new Uri("http://foo/test/bar/foo?test=1&test2=2"); // Act and Assert var result = handler.LookupService(uri); Assert.Equal(new Uri("http://foundit:5555/test/bar/foo?test=1&test2=2"), result); }
public void LookupService_NonDefaultPort_ReturnsOriginalURI() { // Arrange IDiscoveryClient client = new TestDiscoveryClient(); DiscoveryHttpClientHandler handler = new DiscoveryHttpClientHandler(client); Uri uri = new Uri("http://foo:8080/test"); // Act and Assert var result = handler.LookupService(uri); Assert.Equal(uri, result); }