File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
FirebaseAdmin/FirebaseAdmin.Tests/Util Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,24 @@ public void NoErrorResponseHandler()
216
216
( ) => new ErrorHandlingHttpClient < FirebaseException > ( args ) ) ;
217
217
}
218
218
219
+ [ Fact ]
220
+ public async Task Dispose ( )
221
+ {
222
+ var handler = new MockMessageHandler ( )
223
+ {
224
+ Response = @"{}" ,
225
+ } ;
226
+ var factory = new MockHttpClientFactory ( handler ) ;
227
+ var httpClient = new ErrorHandlingHttpClient < FirebaseException > (
228
+ this . CreateArgs ( factory ) ) ;
229
+
230
+ httpClient . Dispose ( ) ;
231
+
232
+ await Assert . ThrowsAsync < ObjectDisposedException > (
233
+ async ( ) => await httpClient . SendAndDeserializeAsync < Dictionary < string , string > > (
234
+ this . CreateRequest ( ) ) ) ;
235
+ }
236
+
219
237
private ErrorHandlingHttpClientArgs < FirebaseException > CreateArgs (
220
238
HttpClientFactory factory , GoogleCredential credential = null )
221
239
{
You can’t perform that action at this time.
0 commit comments