-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from focus-shift/align-with-uv-5.9
Align with uv 5.9
- Loading branch information
Showing
4 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
.../main/java/de/focus_shift/urlaubsverwaltung/extension/api/person/MailNotificationDTO.java
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package de.focus_shift.urlaubsverwaltung.extension.api.person; | ||
|
||
/** Describes which kind of mail notifications a person can have. */ | ||
public enum MailNotificationDTO { | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_APPLIED, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_ALLOWED, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_REVOKED, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_REJECTED, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_TEMPORARY_ALLOWED, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_CANCELLATION, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_EDITED, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_CONVERTED, | ||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_WAITING_REMINDER, | ||
|
||
NOTIFICATION_EMAIL_APPLICATION_MANAGEMENT_CANCELLATION_REQUESTED, | ||
|
||
NOTIFICATION_EMAIL_APPLICATION_APPLIED, | ||
NOTIFICATION_EMAIL_APPLICATION_ALLOWED, | ||
NOTIFICATION_EMAIL_APPLICATION_REVOKED, | ||
NOTIFICATION_EMAIL_APPLICATION_REJECTED, | ||
NOTIFICATION_EMAIL_APPLICATION_TEMPORARY_ALLOWED, | ||
NOTIFICATION_EMAIL_APPLICATION_CANCELLATION, | ||
NOTIFICATION_EMAIL_APPLICATION_EDITED, | ||
NOTIFICATION_EMAIL_APPLICATION_CONVERTED, | ||
NOTIFICATION_EMAIL_APPLICATION_UPCOMING, | ||
|
||
NOTIFICATION_EMAIL_APPLICATION_HOLIDAY_REPLACEMENT, | ||
NOTIFICATION_EMAIL_APPLICATION_HOLIDAY_REPLACEMENT_UPCOMING, | ||
|
||
NOTIFICATION_EMAIL_APPLICATION_COLLEAGUES_ALLOWED, | ||
NOTIFICATION_EMAIL_APPLICATION_COLLEAGUES_CANCELLATION, | ||
|
||
NOTIFICATION_EMAIL_PERSON_NEW_MANAGEMENT_ALL, | ||
|
||
NOTIFICATION_EMAIL_OVERTIME_MANAGEMENT_APPLIED, | ||
NOTIFICATION_EMAIL_OVERTIME_APPLIED_BY_MANAGEMENT, | ||
NOTIFICATION_EMAIL_OVERTIME_APPLIED, | ||
|
||
NOTIFICATION_EMAIL_SICK_NOTE_SUBMITTED_BY_USER_TO_USER, | ||
NOTIFICATION_EMAIL_SICK_NOTE_SUBMITTED_BY_USER_TO_MANAGEMENT, | ||
NOTIFICATION_EMAIL_SICK_NOTE_CREATED_BY_MANAGEMENT, | ||
NOTIFICATION_EMAIL_SICK_NOTE_CREATED_BY_MANAGEMENT_TO_MANAGEMENT, | ||
NOTIFICATION_EMAIL_SICK_NOTE_ACCEPTED_BY_MANAGEMENT_TO_USER, | ||
NOTIFICATION_EMAIL_SICK_NOTE_ACCEPTED_BY_MANAGEMENT_TO_MANAGEMENT, | ||
NOTIFICATION_EMAIL_SICK_NOTE_EDITED_BY_MANAGEMENT, | ||
NOTIFICATION_EMAIL_SICK_NOTE_CANCELLED_BY_MANAGEMENT, | ||
NOTIFICATION_EMAIL_SICK_NOTE_COLLEAGUES_CREATED, | ||
NOTIFICATION_EMAIL_SICK_NOTE_COLLEAGUES_CANCELLED; | ||
} |
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
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
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ void happyPath() { | |
.firstName("Marlene") | ||
.email("[email protected]") | ||
.permissions(Set.of(RoleDTO.USER)) | ||
.notifications(Set.of(MailNotificationDTO.NOTIFICATION_EMAIL_APPLICATION_APPLIED)) | ||
.build(); | ||
|
||
assertThat(person).isNotNull(); | ||
|
@@ -28,6 +29,8 @@ void happyPath() { | |
assertThat(person.getEmail()).isEqualTo("[email protected]"); | ||
assertThat(person.isEnabled()).isTrue(); | ||
assertThat(person.getPermissions()).containsOnly(RoleDTO.USER); | ||
assertThat(person.getNotifications()) | ||
.containsOnly(MailNotificationDTO.NOTIFICATION_EMAIL_APPLICATION_APPLIED); | ||
} | ||
|
||
@Test | ||
|
@@ -55,6 +58,7 @@ private static PersonDTO anyPerson() { | |
.firstName("Marlene") | ||
.email("[email protected]") | ||
.permissions(Set.of(RoleDTO.USER)) | ||
.notifications(Set.of(MailNotificationDTO.NOTIFICATION_EMAIL_APPLICATION_APPLIED)) | ||
.build(); | ||
} | ||
} |