-
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.
Refactor, Send Provider Confirmation plus tests
- Loading branch information
Showing
7 changed files
with
154 additions
and
82 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 |
---|---|---|
|
@@ -7,8 +7,9 @@ | |
|
||
@Getter | ||
public class ILGCCEmail { | ||
|
||
public static final String FROM_ADDRESS = "[email protected]"; | ||
public static final String EMAIL_SENDER_KEY = "email.sender-name"; | ||
public static final String EMAIL_SENDER_KEY = "email.general.sender-name"; | ||
|
||
private Email senderEmail; | ||
private String subject; | ||
|
@@ -17,7 +18,8 @@ public class ILGCCEmail { | |
private UUID submissionId; | ||
private Email recipientEmail; | ||
|
||
public ILGCCEmail(String senderName, String recipientAddress, String subject, Content body, EmailType emailType, UUID submissionId) { | ||
public ILGCCEmail(String senderName, String recipientAddress, String subject, Content body, EmailType emailType, | ||
UUID submissionId) { | ||
this.senderEmail = new Email(FROM_ADDRESS, senderName); | ||
this.recipientEmail = new Email(recipientAddress); | ||
this.subject = subject; | ||
|
@@ -27,11 +29,13 @@ public ILGCCEmail(String senderName, String recipientAddress, String subject, Co | |
} | ||
|
||
|
||
public static ILGCCEmail createFamilyConfirmationEmail(String senderName, String recipientAddress, String subject, Content body, UUID submissionId){ | ||
public static ILGCCEmail createFamilyConfirmationEmail(String senderName, String recipientAddress, String subject, | ||
Content body, UUID submissionId) { | ||
return new ILGCCEmail(senderName, recipientAddress, subject, body, EmailType.FAMILY_CONFIRMATION_EMAIL, submissionId); | ||
} | ||
|
||
public static ILGCCEmail createProviderConfirmationEmail(String senderName, String recipientAddress, String subject, Content body, UUID submissionId){ | ||
public static ILGCCEmail createProviderConfirmationEmail(String senderName, String recipientAddress, String subject, | ||
Content body, UUID submissionId) { | ||
return new ILGCCEmail(senderName, recipientAddress, subject, body, EmailType.PROVIDER_CONFIRMATION_EMAIL, submissionId); | ||
} | ||
|
||
|
@@ -49,6 +53,4 @@ public enum EmailType { | |
this.description = description; | ||
} | ||
} | ||
|
||
|
||
} |
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
Oops, something went wrong.