File tree Expand file tree Collapse file tree 3 files changed +18
-6
lines changed
src/Security/Authentication
Negotiate/test/Negotiate.Test Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate;
2020
2121public class NegotiateHandlerTests
2222{
23+ [ Fact ]
24+ public void EventsPropertyIsInitializedOnConstruction ( )
25+ {
26+ var options = new NegotiateOptions ( ) ;
27+ Assert . NotNull ( options . Events ) ;
28+ }
29+
2330 [ Fact ]
2431 public async Task Anonymous_MissingConnectionFeatures_ThrowsNotSupported ( )
2532 {
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ namespace Microsoft.AspNetCore.Authentication.Certificate.Test;
2222
2323public class ClientCertificateAuthenticationTests
2424{
25+ [ Fact ]
26+ public void EventsPropertyIsInitializedOnConstruction ( )
27+ {
28+ var options = new CertificateAuthenticationOptions ( ) ;
29+ Assert . NotNull ( options . Events ) ;
30+ }
2531
2632 [ Fact ]
2733 public async Task VerifySchemeDefaults ( )
Original file line number Diff line number Diff line change @@ -33,15 +33,14 @@ public class JwtBearerTests : SharedAuthenticationTests<JwtBearerOptions>
3333
3434 protected override void RegisterAuth ( AuthenticationBuilder services , Action < JwtBearerOptions > configure )
3535 {
36- services . AddJwtBearer ( o =>
37- {
38- ConfigureDefaults ( o ) ;
39- configure . Invoke ( o ) ;
40- } ) ;
36+ services . AddJwtBearer ( configure ) ;
4137 }
4238
43- private void ConfigureDefaults ( JwtBearerOptions o )
39+ [ Fact ]
40+ public void EventsPropertyIsInitializedOnConstruction ( )
4441 {
42+ var options = new JwtBearerOptions ( ) ;
43+ Assert . NotNull ( options . Events ) ;
4544 }
4645
4746 [ Fact ]
You can’t perform that action at this time.
0 commit comments