public void GetRequestMessage_AddsBasicAuthIfPassword() { ConfigServerClientSettings settings = new ConfigServerClientSettings(); settings.Uri = "http://*****:*****@localhost:8888/"; settings.Name = "foo"; settings.Environment = "development"; ConfigServerConfigurationProvider provider = new ConfigServerConfigurationProvider(settings); string requestURI = provider.GetConfigServerUri(null); var request = provider.GetRequestMessage(requestURI); Assert.Equal(HttpMethod.Get, request.Method); Assert.Equal(requestURI, request.RequestUri.ToString()); Assert.NotNull(request.Headers.Authorization); Assert.Equal("Basic", request.Headers.Authorization.Scheme); Assert.Equal(provider.GetEncoded("user", "password"), request.Headers.Authorization.Parameter); }