2525import pl .edu .icm .unity .oauth .as .OAuthAuthzContext ;
2626import pl .edu .icm .unity .oauth .as .OAuthErrorResponseException ;
2727
28- public class ACRConsistencyValidatorTest
28+ public class EssentialACRConsistencyValidatorTest
2929{
3030 @ Test
3131 public void shouldThrowExceptionWhenReturnedACRNotContainsRequestedACR () throws OAuthErrorResponseException , URISyntaxException
@@ -34,7 +34,7 @@ public void shouldThrowExceptionWhenReturnedACRNotContainsRequestedACR() throws
3434 context .setAcr (new ACRRequest (List .of (new ACR ("essentialACR1" )), null ));
3535 context .setReturnURI (new URI ("return" ));
3636 List <DynamicAttribute > attrs = List .of (new DynamicAttribute (new Attribute ("acr" , null , null , List .of ("acr1" ))));
37- assertThrows (OAuthErrorResponseException .class , () -> ACRConsistencyValidator . verifyACRAttribute (context , attrs ));
37+ assertThrows (OAuthErrorResponseException .class , () -> EssentialACRConsistencyValidator . verifyEssentialRequestedACRisReturned (context , attrs ));
3838 }
3939
4040 @ Test
@@ -44,7 +44,7 @@ public void shouldValidateSuccessfulltWhenACRContainsRequestedACR() throws OAuth
4444 context .setAcr (new ACRRequest (List .of (new ACR ("essentialACR1" )), null ));
4545 context .setReturnURI (new URI ("return" ));
4646 List <DynamicAttribute > attrs = List .of (new DynamicAttribute (new Attribute ("acr" , null , null , List .of ("essentialACR1" ))));
47- assertDoesNotThrow (() -> ACRConsistencyValidator . verifyACRAttribute (context , attrs ));
47+ assertDoesNotThrow (() -> EssentialACRConsistencyValidator . verifyEssentialRequestedACRisReturned (context , attrs ));
4848 }
4949
5050 @ Test
@@ -54,6 +54,6 @@ public void shouldValidateSuccessfulltWhenRequestedACRisVoluntary() throws OAuth
5454 context .setAcr (new ACRRequest (List .of (), List .of (new ACR ("voluntaryACR1" ))));
5555 context .setReturnURI (new URI ("return" ));
5656 List <DynamicAttribute > attrs = List .of (new DynamicAttribute (new Attribute ("acr" , null , null , List .of ("anotherACR" ))));
57- assertDoesNotThrow (() -> ACRConsistencyValidator . verifyACRAttribute (context , attrs ));
57+ assertDoesNotThrow (() -> EssentialACRConsistencyValidator . verifyEssentialRequestedACRisReturned (context , attrs ));
5858 }
5959}
0 commit comments