@ -29,7 +29,7 @@ import org.mockito.Mockito;
/ * *
* Original code repo : https : //github.com/mschwartau/keycloak-custom-protocol-mapper-example
* /
public class GCub eContextMapperTest {
public class D4Scienc eContextMapperTest {
static final String CLAIM_NAME = "haandlerIdClaimNameExample" ;
static final String HEADER_VALUE = "ginostilla" ;
@ -37,27 +37,27 @@ public class GCubeContextMapperTest {
@Test
public void shouldTokenMapperDisplayCategory ( ) {
final String tokenMapperDisplayCategory = new FullNameMapper ( ) . getDisplayCategory ( ) ;
assertThat ( new GCub eContextMapper( ) . getDisplayCategory ( ) ) . isEqualTo ( tokenMapperDisplayCategory ) ;
assertThat ( new D4Scienc eContextMapper( ) . getDisplayCategory ( ) ) . isEqualTo ( tokenMapperDisplayCategory ) ;
}
@Test
public void shouldHaveDisplayType ( ) {
assertThat ( new GCub eContextMapper( ) . getDisplayType ( ) ) . isNotBlank ( ) ;
assertThat ( new D4Scienc eContextMapper( ) . getDisplayType ( ) ) . isNotBlank ( ) ;
}
@Test
public void shouldHaveHelpText ( ) {
assertThat ( new GCub eContextMapper( ) . getHelpText ( ) ) . isNotBlank ( ) ;
assertThat ( new D4Scienc eContextMapper( ) . getHelpText ( ) ) . isNotBlank ( ) ;
}
@Test
public void shouldHaveIdId ( ) {
assertThat ( new GCub eContextMapper( ) . getId ( ) ) . isNotBlank ( ) ;
assertThat ( new D4Scienc eContextMapper( ) . getId ( ) ) . isNotBlank ( ) ;
}
@Test
public void shouldHaveProperties ( ) {
final List < String > configPropertyNames = new GCub eContextMapper( ) . getConfigProperties ( ) . stream ( )
final List < String > configPropertyNames = new D4Scienc eContextMapper( ) . getConfigProperties ( ) . stream ( )
. map ( ProviderConfigProperty : : getName )
. collect ( Collectors . toList ( ) ) ;
@ -104,9 +104,9 @@ public class GCubeContextMapperTest {
when ( context . getRequestHeaders ( ) ) . thenReturn ( headers ) ;
if ( withHeader ) {
when ( headers . getHeaderString ( GCub eContextMapper. HEADER_NAME ) ) . thenReturn ( HEADER_VALUE ) ;
when ( headers . getHeaderString ( D4Scienc eContextMapper. HEADER_NAME ) ) . thenReturn ( HEADER_VALUE ) ;
} else {
when ( headers . getHeaderString ( GCub eContextMapper. HEADER_NAME ) ) . thenReturn ( "" ) ;
when ( headers . getHeaderString ( D4Scienc eContextMapper. HEADER_NAME ) ) . thenReturn ( "" ) ;
}
return keycloakSession ;
}
@ -121,7 +121,7 @@ public class GCubeContextMapperTest {
at . setResourceAccess ( Maps . newHashMap ( HEADER_VALUE , null ) ) ;
}
return new GCub eContextMapper( ) . transformAccessToken ( at , mappingModel , keycloakSession ,
return new D4Scienc eContextMapper( ) . transformAccessToken ( at , mappingModel , keycloakSession ,
userSessionModel , givenClientSessionContext ( ) ) ;
}