@@ -40,11 +40,10 @@ public async Task IfAnProviderIsEnabledUseEnabledProvider()
4040 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "True" ) ;
4141 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION" , "RedirectToLoginPage" ) ;
4242 var configBuilder = new ConfigurationBuilder ( ) ;
43- configBuilder . AddEnvironmentVariables ( ) ;
43+ _ = configBuilder . AddEnvironmentVariables ( ) ;
4444 var config = configBuilder . Build ( ) ;
4545 var options = new EasyAuthAuthenticationOptions ( ) ;
4646 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = true } ) ;
47-
4847
4948 var services = new ServiceCollection ( ) . AddOptions ( )
5049 . AddSingleton < IOptionsFactory < EasyAuthAuthenticationOptions > , OptionsFactory < EasyAuthAuthenticationOptions > > ( )
@@ -74,7 +73,7 @@ public async Task IfAnProviderIsdisabledSkipProvider()
7473 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "True" ) ;
7574 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION" , "RedirectToLoginPage" ) ;
7675 var configBuilder = new ConfigurationBuilder ( ) ;
77- configBuilder . AddEnvironmentVariables ( ) ;
76+ _ = configBuilder . AddEnvironmentVariables ( ) ;
7877 var config = configBuilder . Build ( ) ;
7978 var options = new EasyAuthAuthenticationOptions ( ) ;
8079 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = false } ) ;
@@ -107,7 +106,7 @@ public async Task IfTheUserIsAlreadyAuthorizedTheAuthResultIsSuccess()
107106 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "True" ) ;
108107 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION" , "RedirectToLoginPage" ) ;
109108 var configBuilder = new ConfigurationBuilder ( ) ;
110- configBuilder . AddEnvironmentVariables ( ) ;
109+ _ = configBuilder . AddEnvironmentVariables ( ) ;
111110 var config = configBuilder . Build ( ) ;
112111 var options = new EasyAuthAuthenticationOptions ( ) ;
113112 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = false } ) ;
@@ -142,7 +141,7 @@ public async Task DontCallTheFallBackIfTheRequestUrlEqualsTheAuthEndPoint()
142141 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "True" ) ;
143142 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION" , "RedirectToLoginPage" ) ;
144143 var configBuilder = new ConfigurationBuilder ( ) ;
145- configBuilder . AddEnvironmentVariables ( ) ;
144+ _ = configBuilder . AddEnvironmentVariables ( ) ;
146145 var config = configBuilder . Build ( ) ;
147146 var options = new EasyAuthAuthenticationOptions ( ) ;
148147 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = false } ) ;
@@ -175,7 +174,7 @@ public async Task CallTheFallBackIfTheRequestUrlNotEqualsTheAuthEndPoint()
175174 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "True" ) ;
176175 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION" , "RedirectToLoginPage" ) ;
177176 var configBuilder = new ConfigurationBuilder ( ) ;
178- configBuilder . AddEnvironmentVariables ( ) ;
177+ _ = configBuilder . AddEnvironmentVariables ( ) ;
179178 var config = configBuilder . Build ( ) ;
180179 var options = new EasyAuthAuthenticationOptions ( ) ;
181180 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = false } ) ;
@@ -208,7 +207,7 @@ public async Task DontCallAProviderIfNotProviderIsRegistered()
208207 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "True" ) ;
209208 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION" , "RedirectToLoginPage" ) ;
210209 var configBuilder = new ConfigurationBuilder ( ) ;
211- configBuilder . AddEnvironmentVariables ( ) ;
210+ _ = configBuilder . AddEnvironmentVariables ( ) ;
212211 var config = configBuilder . Build ( ) ;
213212 var options = new EasyAuthAuthenticationOptions ( ) ;
214213 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = false } ) ;
@@ -238,7 +237,7 @@ public void ErrorIfTheAuthIsEnabledButAnonymousRequestsAreAllowed()
238237 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "True" ) ;
239238 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION" , "AllowAnonymous" ) ;
240239 var configBuilder = new ConfigurationBuilder ( ) ;
241- configBuilder . AddEnvironmentVariables ( ) ;
240+ _ = configBuilder . AddEnvironmentVariables ( ) ;
242241 var config = configBuilder . Build ( ) ;
243242 var options = new EasyAuthAuthenticationOptions ( ) ;
244243 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = false } ) ;
@@ -250,7 +249,7 @@ public void ErrorIfTheAuthIsEnabledButAnonymousRequestsAreAllowed()
250249 . BuildServiceProvider ( ) ;
251250 var monitor = services . GetRequiredService < IOptionsMonitor < EasyAuthAuthenticationOptions > > ( ) ;
252251
253- Assert . Throws < ArgumentException > ( ( ) => new EasyAuthAuthenticationHandler ( monitor , new List < IEasyAuthAuthentificationService > ( ) , this . loggerFactory , this . urlEncoder , this . clock , config ) ) ;
252+ _ = Assert . Throws < ArgumentException > ( ( ) => new EasyAuthAuthenticationHandler ( monitor , new List < IEasyAuthAuthentificationService > ( ) , this . loggerFactory , this . urlEncoder , this . clock , config ) ) ;
254253 }
255254
256255 [ Fact ]
@@ -259,7 +258,7 @@ public async Task UseEasyAuthProviderIfAuthIsDisabled()
259258 // Arrange
260259 System . Environment . SetEnvironmentVariable ( "APPSETTING_WEBSITE_AUTH_ENABLED" , "False" ) ;
261260 var configBuilder = new ConfigurationBuilder ( ) ;
262- configBuilder . AddEnvironmentVariables ( ) ;
261+ _ = configBuilder . AddEnvironmentVariables ( ) ;
263262 var config = configBuilder . Build ( ) ;
264263 var options = new EasyAuthAuthenticationOptions ( ) ;
265264 options . AddProviderOptions ( new ProviderOptions ( "TestProvider" ) { Enabled = false } ) ;
0 commit comments