Skip to content

Commit

Permalink
fix test (#2866)
Browse files Browse the repository at this point in the history
* fix test

* move tests
  • Loading branch information
jennyf19 committed May 28, 2024
1 parent 377200e commit 89dc48d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Identity.Abstractions;
using Microsoft.Identity.Client;
using Microsoft.Identity.Web;
using Microsoft.Identity.Web.Extensibility;
using Xunit;

namespace TokenAcquirerTests
namespace Microsoft.Identity.Web.Test
{
public class BaseAuthorizationHeaderProviderTest
{
Expand All @@ -29,6 +28,7 @@ class CustomAuthorizationHeaderProvider : BaseAuthorizationHeaderProvider
public CustomAuthorizationHeaderProvider(IServiceProvider serviceProvider) : base(serviceProvider)
{
}

public override Task<string> CreateAuthorizationHeaderForAppAsync(string scopes, AuthorizationHeaderProviderOptions? downstreamApiOptions = null, CancellationToken cancellationToken = default)
{
if (downstreamApiOptions?.ProtocolScheme == "Custom")
Expand Down Expand Up @@ -114,7 +114,7 @@ public async Task TestBaseAuthorizationHeaderProvider()
result = await authorizationHeaderProvider.CreateAuthorizationHeaderForUserAsync(["scope"],
new AuthorizationHeaderProviderOptions { }, null, CancellationToken.None);
Assert.Equal("Bearer eXY", result);

TokenAcquirerFactory.ResetDefaultInstance(); // Test only
}
}
}

0 comments on commit 89dc48d

Please sign in to comment.