-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DTSPB-4475 Retain and disposal initial commit
- Loading branch information
Showing
64 changed files
with
1,623 additions
and
172 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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ apiVersion: v2 | |
description: A Helm chart for the HMCTS probate back office service | ||
name: probate-back-office | ||
home: https://github.com/hmcts/probate-back-office | ||
version: 1.0.49 | ||
version: 1.0.50 | ||
maintainers: | ||
- name: HMCTS Probate Team | ||
email: [email protected] | ||
|
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
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 |
---|---|---|
|
@@ -100,6 +100,7 @@ class NotificationServiceIT { | |
private static final Long ID = 1L; | ||
private static final String[] LAST_MODIFIED = {"2018", "1", "1", "0", "0", "0", "0"}; | ||
private static final LocalDateTime LAST_DATE_MODIFIED = LocalDateTime.now(ZoneOffset.UTC).minusYears(2); | ||
private static final LocalDateTime CREATED_DATE = LocalDateTime.now(ZoneOffset.UTC).minusYears(3); | ||
private static final Long CASE_ID = 12345678987654321L; | ||
private static final String SENT_EMAIL_FILE_NAME = "sentEmail.pdf"; | ||
private static final byte[] DOC_BYTES = {(byte) 23}; | ||
|
@@ -447,7 +448,7 @@ public void setUp() throws NotificationClientException, IOException { | |
.grantIssuedDate("2019-05-01") | ||
.deceasedDateOfBirth(LocalDate.of(2019, 1, 1)) | ||
.scannedDocuments(scannedDocuments) | ||
.build(), LAST_DATE_MODIFIED, ID)); | ||
.build(), LAST_DATE_MODIFIED, CREATED_DATE, ID)); | ||
|
||
exelaCaseDataNoWillReference.add(new ReturnedCaseDetails(CaseData.builder() | ||
.applicationType(PERSONAL) | ||
|
@@ -456,7 +457,7 @@ public void setUp() throws NotificationClientException, IOException { | |
.grantIssuedDate("2019-05-01") | ||
.deceasedDateOfBirth(LocalDate.of(2019, 1, 1)) | ||
.scannedDocuments(scannedDocumentsNoWill) | ||
.build(), LAST_DATE_MODIFIED, ID)); | ||
.build(), LAST_DATE_MODIFIED, CREATED_DATE, ID)); | ||
|
||
exelaCaseDataNoSubtype.add(new ReturnedCaseDetails(CaseData.builder() | ||
.applicationType(PERSONAL) | ||
|
@@ -465,7 +466,7 @@ public void setUp() throws NotificationClientException, IOException { | |
.grantIssuedDate("2019-05-01") | ||
.deceasedDateOfBirth(LocalDate.of(2019, 1, 1)) | ||
.scannedDocuments(scannedDocumentsNoSubtype) | ||
.build(), LAST_DATE_MODIFIED, ID)); | ||
.build(), LAST_DATE_MODIFIED, CREATED_DATE, ID)); | ||
|
||
caveatRaisedCaseData = new CaveatDetails(CaveatData.builder() | ||
.applicationType(PERSONAL) | ||
|
@@ -1704,7 +1705,7 @@ void sendGrantDelayedEmail() | |
.put(PERSONALISATION_APPLICANT_NAME, personalGrantDelayedOxford.getData().getPrimaryApplicantFullName()); | ||
|
||
ReturnedCaseDetails returnedCaseDetails = | ||
new ReturnedCaseDetails(personalGrantDelayedOxford.getData(), null, ID); | ||
new ReturnedCaseDetails(personalGrantDelayedOxford.getData(), null, CREATED_DATE, ID); | ||
|
||
when(pdfManagementService.generateAndUpload(any(SentEmail.class), any())).thenReturn(Document.builder() | ||
.documentFileName(SENT_EMAIL_FILE_NAME).build()); | ||
|
@@ -1747,7 +1748,7 @@ void sendGrantDelayedAwaitingDocumentationEmail() | |
.put(PERSONALISATION_APPLICANT_NAME, personalGrantDelayedOxford.getData().getPrimaryApplicantFullName()); | ||
|
||
ReturnedCaseDetails returnedCaseDetails = | ||
new ReturnedCaseDetails(personalGrantDelayedOxford.getData(), null, ID); | ||
new ReturnedCaseDetails(personalGrantDelayedOxford.getData(), null, CREATED_DATE, ID); | ||
|
||
when(pdfManagementService.generateAndUpload(any(SentEmail.class), any())).thenReturn(Document.builder() | ||
.documentFileName(SENT_EMAIL_FILE_NAME).build()); | ||
|
@@ -1792,7 +1793,7 @@ void sendGrantDelayedAwaitingDocumentationSolicitorEmail() | |
.put(PERSONALISATION_APPLICANT_NAME, solicitorGrantDelayedOxford.getData().getPrimaryApplicantFullName()); | ||
|
||
ReturnedCaseDetails returnedCaseDetails = | ||
new ReturnedCaseDetails(solicitorGrantDelayedOxford.getData(), null, ID); | ||
new ReturnedCaseDetails(solicitorGrantDelayedOxford.getData(), null, CREATED_DATE, ID); | ||
|
||
when(pdfManagementService.generateAndUpload(any(SentEmail.class), any())).thenReturn(Document.builder() | ||
.documentFileName(SENT_EMAIL_FILE_NAME).build()); | ||
|
@@ -2189,4 +2190,32 @@ void verifyEmailPreview() | |
|
||
verify(pdfManagementService).generateDocmosisDocumentAndUpload(any(), eq(SENT_EMAIL)); | ||
} | ||
|
||
@Test | ||
void sendDisposalReminderEmail() throws NotificationClientException { | ||
ReturnedCaseDetails returnedCaseDetails = | ||
new ReturnedCaseDetails(personalGrantDelayedOxford.getData(), LAST_DATE_MODIFIED, CREATED_DATE, ID); | ||
when(notificationClient.sendEmail(anyString(), anyString(), any(), anyString())).thenReturn(sendEmailResponse); | ||
notificationService.sendDisposalReminderEmail(returnedCaseDetails); | ||
|
||
verify(notificationClient).sendEmail( | ||
eq("pa-disposal-reminder"), | ||
eq("[email protected]"), | ||
any(), | ||
anyString()); | ||
} | ||
|
||
@Test | ||
void sendSolDisposalReminderEmail() throws NotificationClientException { | ||
ReturnedCaseDetails returnedCaseDetails = | ||
new ReturnedCaseDetails(solicitorGrantDelayedOxford.getData(), LAST_DATE_MODIFIED, CREATED_DATE, ID); | ||
when(notificationClient.sendEmail(anyString(), anyString(), any(), anyString())).thenReturn(sendEmailResponse); | ||
notificationService.sendDisposalReminderEmail(returnedCaseDetails); | ||
|
||
verify(notificationClient).sendEmail( | ||
eq("sol-disposal-reminder"), | ||
eq("[email protected]"), | ||
any(), | ||
anyString()); | ||
} | ||
} |
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
Oops, something went wrong.