-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Slawomir Wieczorek
committed
Dec 19, 2024
1 parent
bc780d5
commit 9365b1b
Showing
1 changed file
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,7 @@ public void testCreateUser() { | |
when(keycloakService.createUser(any())).thenReturn(createdUserId); | ||
when(userRepository.saveAndFlush(any(UserEntity.class))).thenReturn(new UserEntity()); | ||
when(userRepresentation.getEmail()).thenReturn("[email protected]"); | ||
when(userRepresentation.getUsername()).thenReturn("username"); | ||
|
||
// when | ||
String result = userService.createUser(email, firstName, lastName); | ||
|
@@ -207,6 +208,7 @@ public void testDisableUserById_UserFound() { | |
UserRepresentation userRepresentation = new UserRepresentation(); | ||
userRepresentation.setEnabled(true); | ||
userRepresentation.setEmail("[email protected]"); | ||
userRepresentation.setUsername("username"); | ||
UserEntity userEntity = new UserEntity(); | ||
userEntity.setId(uuid); | ||
|
||
|
@@ -248,6 +250,7 @@ public void testEnableUserById_UserFound() { | |
UserRepresentation userRepresentation = new UserRepresentation(); | ||
userRepresentation.setEnabled(false); | ||
userRepresentation.setEmail("[email protected]"); | ||
userRepresentation.setUsername("username"); | ||
UserEntity userEntity = new UserEntity(); | ||
userEntity.setId(uuid); | ||
when(userRepository.getByIdOrAuthId(any(String.class))).thenReturn(userEntity); | ||
|