Skip to content

Commit 8763e16

Browse files
authored
Merge branch 'main' into jmdc/single-global-json
2 parents 5bed07e + 86f7f7a commit 8763e16

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

identity-server/test/IdentityServer.UnitTests/Configuration/DependencyInjection/PostConfigureApplicationCookieTicketStoreTests.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
// Copyright (c) Duende Software. All rights reserved.
2+
// See LICENSE in the project root for license information.
3+
14
using Duende.IdentityServer.Configuration;
25
using Duende.IdentityServer.Licensing.V2;
3-
using FluentAssertions;
46
using Microsoft.AspNetCore.Authentication.Cookies;
57
using Microsoft.Extensions.DependencyInjection;
68
using Microsoft.Extensions.Options;
79
using UnitTests.Common;
8-
using Xunit;
910

1011
namespace UnitTests.Configuration.DependencyInjection;
1112

@@ -22,21 +23,21 @@ public void can_be_constructed_without_httpcontext_and_used_later_with_httpconte
2223
sp.AddSingleton<LicenseAccessor>();
2324
sp.AddSingleton<LicenseUsageTracker>();
2425
});
25-
26+
2627
// The mock http context accessor has a convenient HttpContext, but
2728
// initially we simulate not having it by stashing it away and setting
2829
// the accessor's context to null.
29-
var savedContext = httpContextAccessor.HttpContext;
30+
var savedContext = httpContextAccessor.HttpContext;
3031
httpContextAccessor.HttpContext = null;
3132

3233
var sut = new PostConfigureApplicationCookieTicketStore(
3334
httpContextAccessor,
3435
new IdentityServerOptions
3536
{
36-
Authentication = new AuthenticationOptions
37+
Authentication = new AuthenticationOptions
3738
{
3839
// This is needed so that we operate on the correct scheme
39-
CookieAuthenticationScheme = CookieAuthenticationDefaults.AuthenticationScheme
40+
CookieAuthenticationScheme = CookieAuthenticationDefaults.AuthenticationScheme
4041
}
4142
},
4243
Options.Create<Microsoft.AspNetCore.Authentication.AuthenticationOptions>(new()),
@@ -48,6 +49,6 @@ public void can_be_constructed_without_httpcontext_and_used_later_with_httpconte
4849
var cookieOpts = new CookieAuthenticationOptions();
4950
sut.PostConfigure(CookieAuthenticationDefaults.AuthenticationScheme, cookieOpts);
5051

51-
cookieOpts.SessionStore.Should().BeOfType<TicketStoreShim>();
52+
cookieOpts.SessionStore.ShouldBeOfType<TicketStoreShim>();
5253
}
53-
}
54+
}

0 commit comments

Comments
 (0)