2
2
3
3
import org .ays .AysEndToEndTest ;
4
4
import org .ays .auth .model .AysRole ;
5
- import org .ays .auth .model .AysRoleBuilder ;
6
5
import org .ays .auth .model .AysUser ;
7
6
import org .ays .auth .model .AysUserBuilder ;
8
7
import org .ays .auth .model .enums .AysUserStatus ;
18
17
import org .ays .auth .port .AysRoleReadPort ;
19
18
import org .ays .auth .port .AysUserReadPort ;
20
19
import org .ays .auth .port .AysUserSavePort ;
20
+ import org .ays .common .model .AysPhoneNumberBuilder ;
21
+ import org .ays .common .model .request .AysPhoneNumberRequestBuilder ;
21
22
import org .ays .common .model .response .AysPageResponse ;
22
23
import org .ays .common .model .response .AysResponse ;
23
24
import org .ays .common .model .response .AysResponseBuilder ;
@@ -387,6 +388,11 @@ void givenValidIdAndUserUpdateRequest_whenRolesUpdatedOnly_thenReturnSuccess() t
387
388
AysUser user = userSavePort .save (
388
389
new AysUserBuilder ()
389
390
.withValidValues ()
391
+ .withFirstName ("Test" )
392
+ .withLastName ("Dene" )
393
+ .withEmailAddress ("Test.deneme@afetyonetimsistemi.org" )
394
+ .withCity ("İzmir" )
395
+ .withPhoneNumber (new AysPhoneNumberBuilder ().withValidValues ().build ())
390
396
.withoutId ()
391
397
.withRoles (roles )
392
398
.withInstitution (institution )
@@ -395,12 +401,8 @@ void givenValidIdAndUserUpdateRequest_whenRolesUpdatedOnly_thenReturnSuccess() t
395
401
396
402
// Given
397
403
String id = user .getId ();
398
- List <AysRole > newRoles = List .of (
399
- new AysRoleBuilder ()
400
- .withValidValues ()
401
- .withId ("42fe288d-be87-4169-875e-e721a75cc833" )
402
- .build ()
403
- );
404
+ AysRole newRole = roles .get (0 );
405
+ List <AysRole > newRoles = List .of (newRole );
404
406
405
407
Set <String > newRoleIds = newRoles .stream ()
406
408
.map (AysRole ::getId )
@@ -409,6 +411,11 @@ void givenValidIdAndUserUpdateRequest_whenRolesUpdatedOnly_thenReturnSuccess() t
409
411
410
412
AysUserUpdateRequest updateRequest = new AysUserUpdateRequestBuilder ()
411
413
.withValidValues ()
414
+ .withFirstName ("Test" )
415
+ .withLastName ("Dene" )
416
+ .withEmailAddress ("Test.deneme@afetyonetimsistemi.org" )
417
+ .withCity ("İzmir" )
418
+ .withPhoneNumber (new AysPhoneNumberRequestBuilder ().withValidValues ().build ())
412
419
.withRoleIds (newRoleIds )
413
420
.build ();
414
421
0 commit comments