Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit 9d3fffd

Browse files
committed
chore: code linting
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent 097bb96 commit 9d3fffd

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

Microsoft.Kiota.Http.HttpClientLibrary.Tests/KiotaClientFactoryTests.cs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
using System.Collections;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.Linq;
43
using System.Net;
54
using System.Net.Http;
6-
using Castle.Components.DictionaryAdapter.Xml;
75
using Microsoft.Kiota.Http.HttpClientLibrary.Middleware;
86
using Microsoft.Kiota.Http.HttpClientLibrary.Middleware.Options;
97
using Microsoft.Kiota.Http.HttpClientLibrary.Tests.Mocks;
@@ -112,21 +110,12 @@ public void CreateDefaultHandlersWithOptions()
112110

113111

114112
// Act
115-
var handlers = KiotaClientFactory.CreateDefaultHandlers(new[] { retryHandlerOption });
116-
117-
RetryHandler retryHandler = default;
118-
foreach(var handler in handlers)
119-
{
120-
if(handler is RetryHandler retryFromDefault)
121-
{
122-
retryHandler = retryFromDefault;
123-
break;
124-
}
125-
}
113+
var handlers = KiotaClientFactory.CreateDefaultHandlers([retryHandlerOption]);
114+
var retryHandler = handlers.OfType<RetryHandler>().FirstOrDefault();
126115

127116
// Assert
128117
Assert.NotNull(retryHandler);
129-
Assert.NotNull(retryHandler.RetryOption);
118+
Assert.Equal(retryHandlerOption, retryHandler.RetryOption);
130119
}
131120

132121
[Fact]

0 commit comments

Comments
 (0)