@@ -35,7 +35,7 @@ public async Task Get_KeyDoesNotExist()
3535 var request = new HttpRequestMessage ( HttpMethod . Get , RepoUrl ) ;
3636
3737 // When
38- Assert . Null ( await _cache . GetAsync ( request , TestContext . Current . CancellationToken ) ) ;
38+ Assert . Null ( await _cache . GetResponseAsync ( request , TestContext . Current . CancellationToken ) ) ;
3939
4040 // Then
4141 }
@@ -67,7 +67,10 @@ public async Task Get_WithoutVariation()
6767 ) ;
6868
6969 // When
70- using var found = await _cache . GetAsync ( request , TestContext . Current . CancellationToken ) ;
70+ using var found = await _cache . GetResponseAsync (
71+ request ,
72+ TestContext . Current . CancellationToken
73+ ) ;
7174
7275 // Then
7376 Assert . NotNull ( found ) ;
@@ -101,7 +104,7 @@ public async Task Get_WithVariation_SharedSingleHeader()
101104 ) ;
102105
103106 // When
104- using var found = await _cache . GetWithVariationAsync (
107+ using var found = await _cache . GetResponseWithVariationAsync (
105108 request ,
106109 TestContext . Current . CancellationToken
107110 ) ;
@@ -135,7 +138,7 @@ public async Task Get_WithVariation_PrivateMultipleHeaders()
135138 ) ;
136139
137140 // When
138- using var found = await _cache . GetWithVariationAsync (
141+ using var found = await _cache . GetResponseWithVariationAsync (
139142 request ,
140143 TestContext . Current . CancellationToken
141144 ) ;
@@ -168,14 +171,17 @@ public async Task Set_ResponseExpiration_WithoutVariation()
168171
169172 // Then
170173 _timeProvider . Advance ( TimeSpan . FromSeconds ( 8 ) ) ;
171- using var notExpired = await _cache . GetAsync (
174+ using var notExpired = await _cache . GetResponseAsync (
172175 request ,
173176 TestContext . Current . CancellationToken
174177 ) ;
175178 Assert . Equal ( TimeSpan . FromSeconds ( 2 ) , notExpired ? . Headers . CacheControl ? . MaxAge ) ;
176179
177180 _timeProvider . Advance ( TimeSpan . FromSeconds ( 10 ) ) ;
178- using var expired = await _cache . GetAsync ( request , TestContext . Current . CancellationToken ) ;
181+ using var expired = await _cache . GetResponseAsync (
182+ request ,
183+ TestContext . Current . CancellationToken
184+ ) ;
179185 Assert . Null ( expired ) ;
180186 }
181187
@@ -203,7 +209,7 @@ public async Task Set_ResponseExpiration_WithVariation()
203209 ) ;
204210
205211 // Then
206- using var notExpired = await _cache . GetWithVariationAsync (
212+ using var notExpired = await _cache . GetResponseWithVariationAsync (
207213 request ,
208214 TestContext . Current . CancellationToken
209215 ) ;
@@ -215,7 +221,10 @@ public async Task Set_ResponseExpiration_WithVariation()
215221 ) ;
216222
217223 _timeProvider . Advance ( TimeSpan . FromSeconds ( 20 ) ) ;
218- using var expired = await _cache . GetAsync ( request , TestContext . Current . CancellationToken ) ;
224+ using var expired = await _cache . GetResponseAsync (
225+ request ,
226+ TestContext . Current . CancellationToken
227+ ) ;
219228 Assert . Null ( expired ) ;
220229 }
221230
@@ -255,14 +264,17 @@ await _cache.RefreshResponseAsync(
255264
256265 // Then
257266 _timeProvider . Advance ( TimeSpan . FromSeconds ( 8 ) ) ;
258- using var notExpired = await _cache . GetAsync (
267+ using var notExpired = await _cache . GetResponseAsync (
259268 request ,
260269 TestContext . Current . CancellationToken
261270 ) ;
262271 Assert . Equal ( TimeSpan . FromSeconds ( 2 ) , notExpired ? . Headers . CacheControl ? . MaxAge ) ;
263272
264273 _timeProvider . Advance ( TimeSpan . FromSeconds ( 10 ) ) ;
265- using var expired = await _cache . GetAsync ( request , TestContext . Current . CancellationToken ) ;
274+ using var expired = await _cache . GetResponseAsync (
275+ request ,
276+ TestContext . Current . CancellationToken
277+ ) ;
266278 Assert . Null ( expired ) ;
267279 }
268280
@@ -291,13 +303,16 @@ public async Task Refresh_NoMaxAge()
291303
292304 // Then
293305 _timeProvider . Advance ( TimeSpan . FromSeconds ( 18 ) ) ;
294- using var notExpired = await _cache . GetAsync (
306+ using var notExpired = await _cache . GetResponseAsync (
295307 request ,
296308 TestContext . Current . CancellationToken
297309 ) ;
298310
299311 _timeProvider . Advance ( TimeSpan . FromSeconds ( 10 ) ) ;
300- using var expired = await _cache . GetAsync ( request , TestContext . Current . CancellationToken ) ;
312+ using var expired = await _cache . GetResponseAsync (
313+ request ,
314+ TestContext . Current . CancellationToken
315+ ) ;
301316 Assert . Null ( expired ) ;
302317 }
303318}
0 commit comments