Skip to content
Snippets Groups Projects
Commit 2694245e authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5400 format code correctly

parent 49eb3541
Branches
Tags
No related merge requests found
...@@ -47,7 +47,6 @@ interface KeycloakRealmMapper { ...@@ -47,7 +47,6 @@ interface KeycloakRealmMapper {
public static final String ENABLED = "true"; public static final String ENABLED = "true";
public static final String INTERNATIONALIZATION_ENABLED = "true"; public static final String INTERNATIONALIZATION_ENABLED = "true";
@Mapping(target = "enabled", constant = ENABLED) @Mapping(target = "enabled", constant = ENABLED)
@Mapping(target = "resetPasswordAllowed", constant = RESET_PASSWORD_ALLOWED) @Mapping(target = "resetPasswordAllowed", constant = RESET_PASSWORD_ALLOWED)
@Mapping(target = "supportedLocales", source = ".", qualifiedByName = "supportedLocales") @Mapping(target = "supportedLocales", source = ".", qualifiedByName = "supportedLocales")
...@@ -59,7 +58,6 @@ interface KeycloakRealmMapper { ...@@ -59,7 +58,6 @@ interface KeycloakRealmMapper {
@Mapping(target = "roles.realm", source = "realmRoles") @Mapping(target = "roles.realm", source = "realmRoles")
public RealmRepresentation map(OzgCloudKeycloakRealmSpec realm); public RealmRepresentation map(OzgCloudKeycloakRealmSpec realm);
@Mapping(target = "enabled", constant = ENABLED) @Mapping(target = "enabled", constant = ENABLED)
@Mapping(target = "resetPasswordAllowed", constant = RESET_PASSWORD_ALLOWED) @Mapping(target = "resetPasswordAllowed", constant = RESET_PASSWORD_ALLOWED)
@Mapping(target = "supportedLocales", source = ".", qualifiedByName = "supportedLocales") @Mapping(target = "supportedLocales", source = ".", qualifiedByName = "supportedLocales")
...@@ -97,8 +95,4 @@ interface KeycloakRealmMapper { ...@@ -97,8 +95,4 @@ interface KeycloakRealmMapper {
} }
} }
...@@ -38,7 +38,6 @@ class KeycloakRealmMapperTest { ...@@ -38,7 +38,6 @@ class KeycloakRealmMapperTest {
@Spy @Spy
private final KeycloakRealmMapper mapper = Mappers.getMapper(KeycloakRealmMapper.class); private final KeycloakRealmMapper mapper = Mappers.getMapper(KeycloakRealmMapper.class);
private RealmRepresentation mapRealm() { private RealmRepresentation mapRealm() {
return mapper.map(OzgCloudKeycloakRealmSpecTestFactory.create()); return mapper.map(OzgCloudKeycloakRealmSpecTestFactory.create());
...@@ -228,7 +227,8 @@ class KeycloakRealmMapperTest { ...@@ -228,7 +227,8 @@ class KeycloakRealmMapperTest {
@Test @Test
void shouldMapWhenSmtpServerIsNull() { void shouldMapWhenSmtpServerIsNull() {
var mapped = mapper.update(RealmRepresentationTestFactory.create(), OzgCloudKeycloakRealmSpecTestFactory.createBuilder().smtpServer(null).build()); var mapped = mapper.update(RealmRepresentationTestFactory.create(),
OzgCloudKeycloakRealmSpecTestFactory.createBuilder().smtpServer(null).build());
assertThat(mapped.getSmtpServer()).isEmpty(); assertThat(mapped.getSmtpServer()).isEmpty();
} }
......
...@@ -47,7 +47,6 @@ class KeycloakRealmServiceTest { ...@@ -47,7 +47,6 @@ class KeycloakRealmServiceTest {
private static final String ROLE_NAME = OzgCloudKeycloakRealmSpecTestFactory.ROLE_NAME_1; private static final String ROLE_NAME = OzgCloudKeycloakRealmSpecTestFactory.ROLE_NAME_1;
private static final RealmRole ROLE = OzgCloudKeycloakRealmSpecTestFactory.ROLE1; private static final RealmRole ROLE = OzgCloudKeycloakRealmSpecTestFactory.ROLE1;
@Spy @Spy
@InjectMocks @InjectMocks
private KeycloakRealmService service; private KeycloakRealmService service;
...@@ -129,8 +128,6 @@ class KeycloakRealmServiceTest { ...@@ -129,8 +128,6 @@ class KeycloakRealmServiceTest {
} }
@DisplayName("Add or Update Realm Roles") @DisplayName("Add or Update Realm Roles")
@Nested @Nested
class TestAddOrUpdateRealmRoles { class TestAddOrUpdateRealmRoles {
...@@ -160,7 +157,6 @@ class KeycloakRealmServiceTest { ...@@ -160,7 +157,6 @@ class KeycloakRealmServiceTest {
when(mapper.map(ROLE)).thenReturn(roleRepresentation); when(mapper.map(ROLE)).thenReturn(roleRepresentation);
when(remoteService.getRealmRole(ROLE_NAME, REALM_NAME)).thenReturn(Optional.of(roleRepresentation)); when(remoteService.getRealmRole(ROLE_NAME, REALM_NAME)).thenReturn(Optional.of(roleRepresentation));
service.addOrUpdateRealmRoles(REALM, REALM_NAME); service.addOrUpdateRealmRoles(REALM, REALM_NAME);
verify(remoteService).updateRealmRole(roleRepresentation, REALM_NAME); verify(remoteService).updateRealmRole(roleRepresentation, REALM_NAME);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment