From 1324dd717147906f34ddf7784f02ca208687874c Mon Sep 17 00:00:00 2001 From: marcogagliardi Date: Tue, 5 Sep 2023 11:03:27 +0100 Subject: [PATCH 1/4] VIH-9899 - added new templates and notification types (#138) * added new templates and notification types * Update NotificationType.cs * added existing user LIP template * added existing user template test * Update TemplateDataForEnvironments.cs * Update TemplateDataForEnvironments.cs * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.sds.pr-release.yml * exclusions * Update azure-pipelines.sds.pr-release.yml * Update azure-pipelines.sds.pr-release.yml * Update azure-pipelines.sds.pr-release.yml --- .../ApiTests/GetTemplateTests.cs | 5 + .../NotificationType.cs | 6 +- .../TemplateDataForEnvironments.cs | 1591 ++++++++--------- .../Enums/NotificationType.cs | 6 +- azure-pipelines.sds.pr-release.yml | 2 +- 5 files changed, 719 insertions(+), 891 deletions(-) diff --git a/NotificationApi/NotificationApi.AcceptanceTests/ApiTests/GetTemplateTests.cs b/NotificationApi/NotificationApi.AcceptanceTests/ApiTests/GetTemplateTests.cs index eedf0a4c..0ccf17c5 100644 --- a/NotificationApi/NotificationApi.AcceptanceTests/ApiTests/GetTemplateTests.cs +++ b/NotificationApi/NotificationApi.AcceptanceTests/ApiTests/GetTemplateTests.cs @@ -37,6 +37,7 @@ public class GetTemplateTests : AcApiTest [TestCase(NotificationType.EJudJudgeDemoOrTest)] [TestCase(NotificationType.TelephoneHearingConfirmation)] [TestCase(NotificationType.TelephoneHearingConfirmationMultiDay)] + [TestCase(NotificationType.CreateStaffMember)] [TestCase(NotificationType.HearingAmendmentStaffMember)] [TestCase(NotificationType.HearingConfirmationStaffMember)] [TestCase(NotificationType.HearingConfirmationStaffMemberMultiDay)] @@ -46,6 +47,10 @@ public class GetTemplateTests : AcApiTest [TestCase(NotificationType.NewHearingReminderJOH)] [TestCase(NotificationType.NewHearingReminderEJUD)] [TestCase(NotificationType.NewUserLipWelcome)] + [TestCase(NotificationType.NewUserLipConfirmation)] + [TestCase(NotificationType.NewUserLipConfirmationMultiDay)] + [TestCase(NotificationType.ExistingUserLipConfirmation)] + [TestCase(NotificationType.ExistingUserLipConfirmationMultiDay)] public async Task should_return_okay_and_template(NotificationType notificationType) { // act diff --git a/NotificationApi/NotificationApi.Contract/NotificationType.cs b/NotificationApi/NotificationApi.Contract/NotificationType.cs index f4a065a9..e5a57fa1 100644 --- a/NotificationApi/NotificationApi.Contract/NotificationType.cs +++ b/NotificationApi/NotificationApi.Contract/NotificationType.cs @@ -43,6 +43,10 @@ public enum NotificationType NewHearingReminderRepresentative = 38, NewHearingReminderJOH = 39, NewHearingReminderEJUD = 40, - NewUserLipWelcome = 41 + NewUserLipWelcome = 41, + NewUserLipConfirmation = 42, + NewUserLipConfirmationMultiDay = 43, + ExistingUserLipConfirmation = 44, + ExistingUserLipConfirmationMultiDay = 45 } } diff --git a/NotificationApi/NotificationApi.DAL/TemplateDataForEnvironments.cs b/NotificationApi/NotificationApi.DAL/TemplateDataForEnvironments.cs index 3c430e6c..7219febd 100644 --- a/NotificationApi/NotificationApi.DAL/TemplateDataForEnvironments.cs +++ b/NotificationApi/NotificationApi.DAL/TemplateDataForEnvironments.cs @@ -9,1732 +9,1546 @@ namespace NotificationApi.DAL [ExcludeFromCodeCoverage] public class TemplateDataForEnvironments { + private const string CASE_NAME__CASE_NUMBER__JUDICIAL_OFFICE_HOLDER__DAY_MONTH_YEAR__TIME__USERNAME = "case name, case number, judicial office holder, day month year, time, username"; + + private static Template CreateTemplate(string guid, NotificationType notificationType, MessageType messageType, string parameters) + { + return new Template(new Guid(guid), notificationType, + messageType, parameters); + } + private readonly IList