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

Commit

Permalink
chore: code linting
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed May 21, 2024
1 parent 097bb96 commit 9d3fffd
Showing 1 changed file with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using Castle.Components.DictionaryAdapter.Xml;
using Microsoft.Kiota.Http.HttpClientLibrary.Middleware;
using Microsoft.Kiota.Http.HttpClientLibrary.Middleware.Options;
using Microsoft.Kiota.Http.HttpClientLibrary.Tests.Mocks;
Expand Down Expand Up @@ -112,21 +110,12 @@ public void CreateDefaultHandlersWithOptions()


// Act
var handlers = KiotaClientFactory.CreateDefaultHandlers(new[] { retryHandlerOption });

RetryHandler retryHandler = default;
foreach(var handler in handlers)
{
if(handler is RetryHandler retryFromDefault)
{
retryHandler = retryFromDefault;
break;
}
}
var handlers = KiotaClientFactory.CreateDefaultHandlers([retryHandlerOption]);
var retryHandler = handlers.OfType<RetryHandler>().FirstOrDefault();

// Assert
Assert.NotNull(retryHandler);
Assert.NotNull(retryHandler.RetryOption);
Assert.Equal(retryHandlerOption, retryHandler.RetryOption);
}

[Fact]
Expand Down

0 comments on commit 9d3fffd

Please sign in to comment.