@@ -24,10 +24,10 @@ public class RestClientTest : MockServerTest
2424 [ Test ]
2525 public async Task Authorization ( )
2626 {
27- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
27+ CreateAndConfigureRestClient ( new ClientConfig
2828 {
29- HostUrl = MockServerUrl ,
30- AuthToken = "my-token"
29+ Host = MockServerUrl ,
30+ Token = "my-token"
3131 } ) ;
3232 await DoRequest ( ) ;
3333
@@ -39,9 +39,9 @@ public async Task Authorization()
3939 [ Test ]
4040 public async Task UserAgent ( )
4141 {
42- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
42+ CreateAndConfigureRestClient ( new ClientConfig
4343 {
44- HostUrl = MockServerUrl ,
44+ Host = MockServerUrl ,
4545 } ) ;
4646 await DoRequest ( ) ;
4747
@@ -54,9 +54,9 @@ public async Task UserAgent()
5454 [ Test ]
5555 public async Task Url ( )
5656 {
57- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
57+ CreateAndConfigureRestClient ( new ClientConfig
5858 {
59- HostUrl = MockServerUrl ,
59+ Host = MockServerUrl ,
6060 } ) ;
6161 await DoRequest ( ) ;
6262
@@ -67,9 +67,9 @@ public async Task Url()
6767 [ Test ]
6868 public async Task UrlWithBackslash ( )
6969 {
70- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
70+ CreateAndConfigureRestClient ( new ClientConfig
7171 {
72- HostUrl = $ "{ MockServerUrl } /",
72+ Host = $ "{ MockServerUrl } /",
7373 } ) ;
7474 await DoRequest ( ) ;
7575
@@ -89,9 +89,9 @@ private async Task DoRequest()
8989 [ Test ]
9090 public void ErrorHeader ( )
9191 {
92- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
92+ CreateAndConfigureRestClient ( new ClientConfig
9393 {
94- HostUrl = MockServerUrl ,
94+ Host = MockServerUrl ,
9595 } ) ;
9696
9797 MockServer
@@ -116,9 +116,9 @@ public void ErrorHeader()
116116 [ Test ]
117117 public void ErrorBody ( )
118118 {
119- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
119+ CreateAndConfigureRestClient ( new ClientConfig
120120 {
121- HostUrl = MockServerUrl ,
121+ Host = MockServerUrl ,
122122 } ) ;
123123
124124 MockServer
@@ -143,9 +143,9 @@ public void ErrorBody()
143143 [ Test ]
144144 public void ErrorJsonBody ( )
145145 {
146- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
146+ CreateAndConfigureRestClient ( new ClientConfig
147147 {
148- HostUrl = MockServerUrl ,
148+ Host = MockServerUrl ,
149149 } ) ;
150150
151151 MockServer
@@ -171,9 +171,9 @@ public void ErrorJsonBody()
171171 [ Test ]
172172 public void ErrorReason ( )
173173 {
174- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
174+ CreateAndConfigureRestClient ( new ClientConfig
175175 {
176- HostUrl = MockServerUrl ,
176+ Host = MockServerUrl ,
177177 } ) ;
178178
179179 MockServer
@@ -197,9 +197,9 @@ public void ErrorReason()
197197 [ Test ]
198198 public void AllowHttpRedirects ( )
199199 {
200- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
200+ CreateAndConfigureRestClient ( new ClientConfig
201201 {
202- HostUrl = MockServerUrl ,
202+ Host = MockServerUrl ,
203203 AllowHttpRedirects = true
204204 } ) ;
205205
@@ -209,20 +209,20 @@ public void AllowHttpRedirects()
209209 [ Test ]
210210 public void Timeout ( )
211211 {
212- CreateAndConfigureRestClient ( new InfluxDBClientConfigs
212+ CreateAndConfigureRestClient ( new ClientConfig
213213 {
214- HostUrl = MockServerUrl ,
214+ Host = MockServerUrl ,
215215 Timeout = TimeSpan . FromSeconds ( 45 )
216216 } ) ;
217217
218218 var httpClient = GetDeclaredField < HttpClient > ( _client . GetType ( ) , _client , "_httpClient" ) ;
219219 Assert . That ( httpClient . Timeout , Is . EqualTo ( TimeSpan . FromSeconds ( 45 ) ) ) ;
220220 }
221221
222- private void CreateAndConfigureRestClient ( InfluxDBClientConfigs configs )
222+ private void CreateAndConfigureRestClient ( ClientConfig config )
223223 {
224- _httpClient = InfluxDBClient . CreateAndConfigureHttpClient ( configs ) ;
225- _client = new RestClient ( configs , _httpClient ) ;
224+ _httpClient = InfluxDBClient . CreateAndConfigureHttpClient ( config ) ;
225+ _client = new RestClient ( config , _httpClient ) ;
226226 }
227227
228228 private static T GetDeclaredField < T > ( IReflect type , object instance , string fieldName )
0 commit comments