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

Commit

Permalink
Fix DelegatingHandler tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarmer-msft committed Nov 21, 2018
1 parent 720be2f commit 4ede1a7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Test/Common/Core/HttpFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ public void HttpClientFromDelegatingHandlerExceptionTest()
public void HttpClientFromDelegatingHandlerNullInnerTest()
{
DelegatingHandler delegatingHandler = new DelegatingHandlerImpl();
StorageAuthenticationHttpHandler storageAuthenticationHttpHandler = StorageAuthenticationHttpHandler.Instance;
HttpClientFactory.HttpClientFromDelegatingHandler(delegatingHandler);
Assert.AreEqual(storageAuthenticationHttpHandler, delegatingHandler.InnerHandler);
Assert.IsInstanceOfType(delegatingHandler.InnerHandler, typeof(StorageAuthenticationHttpHandler));
}

[TestMethod]
Expand All @@ -82,9 +81,8 @@ public void HttpClientFromDelegatingHandlerNullInnerTest()
public void HttpClientFromDelegatingHandlerChainTest()
{
DelegatingHandler delegatingHandler = new DelegatingHandlerImpl(new DelegatingHandlerImpl());
StorageAuthenticationHttpHandler storageAuthenticationHttpHandler = StorageAuthenticationHttpHandler.Instance;
HttpClientFactory.HttpClientFromDelegatingHandler(delegatingHandler);
Assert.AreEqual(storageAuthenticationHttpHandler, ((DelegatingHandler)delegatingHandler.InnerHandler).InnerHandler);
Assert.IsInstanceOfType(((DelegatingHandler)delegatingHandler.InnerHandler).InnerHandler, typeof(StorageAuthenticationHttpHandler));
}
}
}

0 comments on commit 4ede1a7

Please sign in to comment.