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() { IDiscoveryClient client = new TestDiscoveryClient(new TestServiceInstance(new Uri("https://foundit:5555"))); var handler = new DiscoveryHttpClientHandlerBase(client); var uri = new Uri("https://foo/test/bar/foo?test=1&test2=2"); var result = handler.LookupService(uri); Assert.Equal(new Uri("https://foundit:5555/test/bar/foo?test=1&test2=2"), result); }
public void LookupService_DoesntFindService_ReturnsOriginalURI() { IDiscoveryClient client = new TestDiscoveryClient(); var handler = new DiscoveryHttpClientHandlerBase(client); var uri = new Uri("https://foo/test"); var result = handler.LookupService(uri); Assert.Equal(uri, result); }
public void LookupService_NonDefaultPort_ReturnsOriginalURI() { // Arrange IDiscoveryClient client = new TestDiscoveryClient(); var handler = new DiscoveryHttpClientHandlerBase(client); var uri = new Uri("https://foo:8080/test"); // Act and Assert var result = handler.LookupService(uri); Assert.Equal(uri, result); }