@@ -13,7 +13,8 @@ namespace AppCoreNet.Extensions.Http.Authentication;
1313
1414public class AuthenticationSchemeProviderTests
1515{
16- private static AuthenticationSchemeProvider CreateAuthenticationSchemeProvider ( HttpClientAuthenticationOptions ? options = null )
16+ private static AuthenticationSchemeProvider CreateAuthenticationSchemeProvider (
17+ HttpClientAuthenticationOptions ? options = null )
1718 {
1819 options ??= new HttpClientAuthenticationOptions ( ) ;
1920 var optionsMonitor = Substitute . For < IOptionsMonitor < HttpClientAuthenticationOptions > > ( ) ;
@@ -25,8 +26,16 @@ private static AuthenticationSchemeProvider CreateAuthenticationSchemeProvider(H
2526 [ Fact ]
2627 public async Task AddsSchemesFromOptions ( )
2728 {
28- var scheme1 = new AuthenticationScheme ( "scheme1" , typeof ( IAuthenticationSchemeHandler < > ) , typeof ( AuthenticationSchemeOptions ) ) ;
29- var scheme2 = new AuthenticationScheme ( "scheme2" , typeof ( IAuthenticationSchemeHandler < > ) , typeof ( AuthenticationSchemeOptions ) ) ;
29+ var scheme1 = new AuthenticationScheme (
30+ "scheme1" ,
31+ typeof ( IAuthenticationSchemeHandler < > ) ,
32+ typeof ( AuthenticationSchemeOptions ) ) ;
33+
34+ var scheme2 = new AuthenticationScheme (
35+ "scheme2" ,
36+ typeof ( IAuthenticationSchemeHandler < > ) ,
37+ typeof ( AuthenticationSchemeOptions ) ) ;
38+
3039 var options = new HttpClientAuthenticationOptions ( ) ;
3140 options . AddScheme ( scheme1 ) ;
3241 options . AddScheme ( scheme2 ) ;
@@ -43,7 +52,11 @@ public void AddSchemeThrowsOnDuplicateScheme()
4352 {
4453 using AuthenticationSchemeProvider provider = CreateAuthenticationSchemeProvider ( ) ;
4554
46- var scheme = new AuthenticationScheme ( "scheme" , typeof ( IAuthenticationSchemeHandler < > ) , typeof ( AuthenticationSchemeOptions ) ) ;
55+ var scheme = new AuthenticationScheme (
56+ "scheme" ,
57+ typeof ( IAuthenticationSchemeHandler < > ) ,
58+ typeof ( AuthenticationSchemeOptions ) ) ;
59+
4760 provider . AddScheme ( scheme ) ;
4861
4962 Action func = ( ) => provider . AddScheme ( scheme ) ;
@@ -57,8 +70,16 @@ public async Task GetAllSchemesReturnsSchemes()
5770 {
5871 using AuthenticationSchemeProvider provider = CreateAuthenticationSchemeProvider ( ) ;
5972
60- var scheme1 = new AuthenticationScheme ( "scheme1" , typeof ( IAuthenticationSchemeHandler < > ) , typeof ( AuthenticationSchemeOptions ) ) ;
61- var scheme2 = new AuthenticationScheme ( "scheme2" , typeof ( IAuthenticationSchemeHandler < > ) , typeof ( AuthenticationSchemeOptions ) ) ;
73+ var scheme1 = new AuthenticationScheme (
74+ "scheme1" ,
75+ typeof ( IAuthenticationSchemeHandler < > ) ,
76+ typeof ( AuthenticationSchemeOptions ) ) ;
77+
78+ var scheme2 = new AuthenticationScheme (
79+ "scheme2" ,
80+ typeof ( IAuthenticationSchemeHandler < > ) ,
81+ typeof ( AuthenticationSchemeOptions ) ) ;
82+
6283 provider . AddScheme ( scheme1 ) ;
6384 provider . AddScheme ( scheme2 ) ;
6485
@@ -72,8 +93,16 @@ public async Task FindSchemeReturnsScheme()
7293 {
7394 using AuthenticationSchemeProvider provider = CreateAuthenticationSchemeProvider ( ) ;
7495
75- var scheme1 = new AuthenticationScheme ( "scheme1" , typeof ( IAuthenticationSchemeHandler < > ) , typeof ( AuthenticationSchemeOptions ) ) ;
76- var scheme2 = new AuthenticationScheme ( "scheme2" , typeof ( IAuthenticationSchemeHandler < > ) , typeof ( AuthenticationSchemeOptions ) ) ;
96+ var scheme1 = new AuthenticationScheme (
97+ "scheme1" ,
98+ typeof ( IAuthenticationSchemeHandler < > ) ,
99+ typeof ( AuthenticationSchemeOptions ) ) ;
100+
101+ var scheme2 = new AuthenticationScheme (
102+ "scheme2" ,
103+ typeof ( IAuthenticationSchemeHandler < > ) ,
104+ typeof ( AuthenticationSchemeOptions ) ) ;
105+
77106 provider . AddScheme ( scheme1 ) ;
78107 provider . AddScheme ( scheme2 ) ;
79108
0 commit comments