@@ -42,7 +42,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
42
42
var apiClient = new HeadersClient ( httpClient ) ;
43
43
44
44
// Act
45
- ApiResponse response = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . HeadCountryCollectionAsync ( ) ) ;
45
+ ApiResponse response = await apiClient . HeadCountryCollectionAsync ( ) ;
46
46
47
47
// Assert
48
48
response . StatusCode . Should ( ) . Be ( ( int ) HttpStatusCode . OK ) ;
@@ -69,7 +69,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
69
69
var apiClient = new HeadersClient ( httpClient ) ;
70
70
71
71
// Act
72
- ApiResponse < CountryCollectionResponseDocument ? > response = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetCountryCollectionAsync ( ) ) ;
72
+ ApiResponse < CountryCollectionResponseDocument > response = await apiClient . GetCountryCollectionAsync ( ) ;
73
73
74
74
// Assert
75
75
response . StatusCode . Should ( ) . Be ( ( int ) HttpStatusCode . OK ) ;
@@ -91,7 +91,7 @@ public async Task Returns_no_ETag_for_failed_GET_request()
91
91
var apiClient = new HeadersClient ( httpClient ) ;
92
92
93
93
// Act
94
- Func < Task > action = async ( ) => await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetCountryAsync ( unknownCountryId ) ) ;
94
+ Func < Task > action = async ( ) => await apiClient . GetCountryAsync ( unknownCountryId ) ;
95
95
96
96
// Assert
97
97
ApiException < ErrorResponseDocument > exception = ( await action . Should ( ) . ThrowExactlyAsync < ApiException < ErrorResponseDocument > > ( ) ) . Which ;
@@ -154,7 +154,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
154
154
using HttpClient httpClient = _testContext . Factory . CreateDefaultClient ( _logHttpMessageHandler ) ;
155
155
var apiClient = new HeadersClient ( httpClient ) ;
156
156
157
- ApiResponse < CountryCollectionResponseDocument ? > response1 = await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetCountryCollectionAsync ( ) ) ;
157
+ ApiResponse < CountryCollectionResponseDocument > response1 = await apiClient . GetCountryCollectionAsync ( ) ;
158
158
159
159
string responseETag = response1 . Headers [ HeaderNames . ETag ] . Single ( ) ;
160
160
@@ -189,8 +189,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
189
189
var apiClient = new HeadersClient ( httpClient ) ;
190
190
191
191
// Act
192
- ApiResponse < CountryCollectionResponseDocument ? > response =
193
- await ApiResponse . TranslateAsync ( async ( ) => await apiClient . GetCountryCollectionAsync ( null , "\" Not-a-matching-value\" " ) ) ;
192
+ ApiResponse < CountryCollectionResponseDocument > response = await apiClient . GetCountryCollectionAsync ( null , "\" Not-a-matching-value\" " ) ;
194
193
195
194
// Assert
196
195
response . StatusCode . Should ( ) . Be ( ( int ) HttpStatusCode . OK ) ;
0 commit comments