diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/REXNotificationBuilder.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/REXNotificationBuilder.java index e53754c09..48f539fc2 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/REXNotificationBuilder.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/REXNotificationBuilder.java @@ -12,10 +12,9 @@ import ru.spcex.platform.imdg.api.ImdgProvider; import java.io.File; import java.time.LocalDate; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; +import java.time.LocalDateTime; +import java.time.format.TextStyle; +import java.util.*; @Component public class REXNotificationBuilder extends NotificationBuilder { @@ -70,7 +69,7 @@ public class REXNotificationBuilder extends NotificationBuilder { return null; } - LocalDate notificationDate = LocalDate.now(); + LocalDateTime notificationDate = LocalDateTime.now(); int day = notificationDate.getDayOfMonth(); int month = notificationDate.getMonthValue(); int year = notificationDate.getYear(); @@ -80,8 +79,8 @@ public class REXNotificationBuilder extends NotificationBuilder { valuesForTemplate.put("${dateStr}", dateStr); valuesForTemplate.put("${count}", String.valueOf(notificationId)); valuesForTemplate.put("${currDay}", "%02d".formatted(day)); - valuesForTemplate.put("${currMonth}", "%02d".formatted(month)); - valuesForTemplate.put("${currYear}", "%04d".formatted(year % 100)); + valuesForTemplate.put("${currMonth}", notificationDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("ru"))); + valuesForTemplate.put("${currYear}", "%02d".formatted(year % 100)); valuesForTemplate.put("${validFromDate}", "%02d.%02d.%04d".formatted(day, month, year)); String outputFilename = "REX.%s.%s.docx".formatted(companyClearingCode, filenameDateTimeFormatter.format(notificationDate)); diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_ACTV_NotificationBuilder.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_ACTV_NotificationBuilder.java index 5dbf69886..9ec7c85e2 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_ACTV_NotificationBuilder.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_ACTV_NotificationBuilder.java @@ -15,6 +15,9 @@ import ru.spcex.platform.imdg.api.ImdgProvider; import java.io.File; import java.time.Instant; import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.TextStyle; import java.util.*; @Component @@ -71,7 +74,7 @@ public class ROOT_ACTV_NotificationBuilder extends NotificationBuilder { return null; } - LocalDate notificationDate = LocalDate.now(); + LocalDateTime notificationDate = LocalDateTime.now(); int day = notificationDate.getDayOfMonth(); int month = notificationDate.getMonthValue(); int year = notificationDate.getYear(); @@ -81,13 +84,13 @@ public class ROOT_ACTV_NotificationBuilder extends NotificationBuilder { valuesForTemplate.put("${dateStr}", dateStr); valuesForTemplate.put("${count}", String.valueOf(notificationId)); valuesForTemplate.put("${currDay}", "%02d".formatted(day)); - valuesForTemplate.put("${currMonth}", "%02d".formatted(month)); - valuesForTemplate.put("${currYear}", "%04d".formatted(year % 100)); + valuesForTemplate.put("${currMonth}", notificationDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("ru"))); + valuesForTemplate.put("${currYear}", "%02d".formatted(year % 100)); valuesForTemplate.put("${companyFullName}", company.getFullName()); valuesForTemplate.put("${companySymbolsINN}", companySymbols.getCompanySymbolValue()); valuesForTemplate.put("${companyClearingCode}", companyClearingCode); - valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt)); + valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt.atZone(ZoneId.systemDefault()).toLocalDate())); String outputFilename = "ROOT.ACTV.%s.%s.docx".formatted(companyClearingCode, filenameDateTimeFormatter.format(notificationDate)); outputFilename = normalizeFilenameForOS(outputFilename); diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_BLKD_NotificationBuilder.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_BLKD_NotificationBuilder.java index 7b619e177..a9d757451 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_BLKD_NotificationBuilder.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_BLKD_NotificationBuilder.java @@ -15,6 +15,9 @@ import ru.spcex.platform.imdg.api.ImdgProvider; import java.io.File; import java.time.Instant; import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.TextStyle; import java.util.*; @Component @@ -71,7 +74,7 @@ public class ROOT_BLKD_NotificationBuilder extends NotificationBuilder { return null; } - LocalDate notificationDate = LocalDate.now(); + LocalDateTime notificationDate = LocalDateTime.now(); int day = notificationDate.getDayOfMonth(); int month = notificationDate.getMonthValue(); int year = notificationDate.getYear(); @@ -81,13 +84,13 @@ public class ROOT_BLKD_NotificationBuilder extends NotificationBuilder { valuesForTemplate.put("${dateStr}", dateStr); valuesForTemplate.put("${count}", String.valueOf(notificationId)); valuesForTemplate.put("${currDay}", "%02d".formatted(day)); - valuesForTemplate.put("${currMonth}", "%02d".formatted(month)); - valuesForTemplate.put("${currYear}", "%04d".formatted(year % 100)); + valuesForTemplate.put("${currMonth}", notificationDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("ru"))); + valuesForTemplate.put("${currYear}", "%02d".formatted(year % 100)); valuesForTemplate.put("${companyFullName}", company.getFullName()); valuesForTemplate.put("${companySymbolsINN}", companySymbols.getCompanySymbolValue()); valuesForTemplate.put("${companyClearingCode}", companyClearingCode); - valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt)); + valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt.atZone(ZoneId.systemDefault()).toLocalDate())); String outputFilename = "ROOT.BLKD.%s.%s.docx".formatted(companyClearingCode, filenameDateTimeFormatter.format(notificationDate)); outputFilename = normalizeFilenameForOS(outputFilename); diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_CLOS_NotificationBuilder.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_CLOS_NotificationBuilder.java index e84ee9b06..4ccbb8d21 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_CLOS_NotificationBuilder.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_CLOS_NotificationBuilder.java @@ -13,10 +13,9 @@ import ru.spcex.platform.imdg.api.ImdgProvider; import java.io.File; import java.time.LocalDate; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; +import java.time.LocalDateTime; +import java.time.format.TextStyle; +import java.util.*; @Component public class ROOT_CLOS_NotificationBuilder extends NotificationBuilder { @@ -83,7 +82,7 @@ public class ROOT_CLOS_NotificationBuilder extends NotificationBuilder { return null; } - LocalDate notificationDate = LocalDate.now(); + LocalDateTime notificationDate = LocalDateTime.now(); int day = notificationDate.getDayOfMonth(); int month = notificationDate.getMonthValue(); int year = notificationDate.getYear(); @@ -93,8 +92,8 @@ public class ROOT_CLOS_NotificationBuilder extends NotificationBuilder { valuesForTemplate.put("${dateStr}", dateStr); valuesForTemplate.put("${count}", String.valueOf(notificationId)); valuesForTemplate.put("${currDay}", "%02d".formatted(day)); - valuesForTemplate.put("${currMonth}", "%02d".formatted(month)); - valuesForTemplate.put("${currYear}", "%04d".formatted(year % 100)); + valuesForTemplate.put("${currMonth}", notificationDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("ru"))); + valuesForTemplate.put("${currYear}", "%02d".formatted(year % 100)); valuesForTemplate.put("${companyFullName}", company.getFullName()); valuesForTemplate.put("${companySymbolsINN}", companySymbols.getCompanySymbolValue()); valuesForTemplate.put("${companyClearingCode}", companyClearingCode); diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_NEW_NotificationBuilder.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_NEW_NotificationBuilder.java index a698ce90c..f341e75d1 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_NEW_NotificationBuilder.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_NEW_NotificationBuilder.java @@ -13,10 +13,9 @@ import ru.spcex.platform.imdg.api.ImdgProvider; import java.io.File; import java.time.LocalDate; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; +import java.time.LocalDateTime; +import java.time.format.TextStyle; +import java.util.*; @Component public class ROOT_NEW_NotificationBuilder extends NotificationBuilder { @@ -83,7 +82,7 @@ public class ROOT_NEW_NotificationBuilder extends NotificationBuilder { return null; } - LocalDate notificationDate = LocalDate.now(); + LocalDateTime notificationDate = LocalDateTime.now(); int day = notificationDate.getDayOfMonth(); int month = notificationDate.getMonthValue(); int year = notificationDate.getYear(); @@ -93,8 +92,8 @@ public class ROOT_NEW_NotificationBuilder extends NotificationBuilder { valuesForTemplate.put("${dateStr}", dateStr); valuesForTemplate.put("${count}", String.valueOf(notificationId)); valuesForTemplate.put("${currDay}", "%02d".formatted(day)); - valuesForTemplate.put("${currMonth}", "%02d".formatted(month)); - valuesForTemplate.put("${currYear}", "%04d".formatted(year % 100)); + valuesForTemplate.put("${currMonth}", notificationDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("ru"))); + valuesForTemplate.put("${currYear}", "%02d".formatted(year % 100)); valuesForTemplate.put("${companyFullName}", company.getFullName()); valuesForTemplate.put("${companySymbolsINN}", companySymbols.getCompanySymbolValue()); valuesForTemplate.put("${companyClearingCode}", companyClearingCode); diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_SSPD_NotificationBuilder.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_SSPD_NotificationBuilder.java index 9497e3631..73569c55a 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_SSPD_NotificationBuilder.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/ROOT_SSPD_NotificationBuilder.java @@ -15,6 +15,9 @@ import ru.spcex.platform.imdg.api.ImdgProvider; import java.io.File; import java.time.Instant; import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.TextStyle; import java.util.*; @Component @@ -71,7 +74,7 @@ public class ROOT_SSPD_NotificationBuilder extends NotificationBuilder { return null; } - LocalDate notificationDate = LocalDate.now(); + LocalDateTime notificationDate = LocalDateTime.now(); int day = notificationDate.getDayOfMonth(); int month = notificationDate.getMonthValue(); int year = notificationDate.getYear(); @@ -81,13 +84,13 @@ public class ROOT_SSPD_NotificationBuilder extends NotificationBuilder { valuesForTemplate.put("${dateStr}", dateStr); valuesForTemplate.put("${count}", String.valueOf(notificationId)); valuesForTemplate.put("${currDay}", "%02d".formatted(day)); - valuesForTemplate.put("${currMonth}", "%02d".formatted(month)); - valuesForTemplate.put("${currYear}", "%04d".formatted(year % 100)); + valuesForTemplate.put("${currMonth}", notificationDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("ru"))); + valuesForTemplate.put("${currYear}", "%02d".formatted(year % 100)); valuesForTemplate.put("${companyFullName}", company.getFullName()); valuesForTemplate.put("${companySymbolsINN}", companySymbols.getCompanySymbolValue()); valuesForTemplate.put("${companyClearingCode}", companyClearingCode); - valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt)); + valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt.atZone(ZoneId.systemDefault()).toLocalDate())); String outputFilename = "ROOT.SSPD.%s.%s.docx".formatted(companyClearingCode, filenameDateTimeFormatter.format(notificationDate)); outputFilename = normalizeFilenameForOS(outputFilename); diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/RRPCNotificationBuilder.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/RRPCNotificationBuilder.java index 46ff76f60..609531c94 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/RRPCNotificationBuilder.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/notifications/RRPCNotificationBuilder.java @@ -14,7 +14,9 @@ import ru.spcex.platform.imdg.api.ImdgProvider; import java.io.File; import java.time.Instant; -import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.TextStyle; import java.util.*; @Component @@ -71,7 +73,7 @@ public class RRPCNotificationBuilder extends NotificationBuilder { return null; } - LocalDate notificationDate = LocalDate.now(); + LocalDateTime notificationDate = LocalDateTime.now(); int day = notificationDate.getDayOfMonth(); int month = notificationDate.getMonthValue(); int year = notificationDate.getYear(); @@ -81,10 +83,10 @@ public class RRPCNotificationBuilder extends NotificationBuilder { valuesForTemplate.put("${dateStr}", dateStr); valuesForTemplate.put("${count}", String.valueOf(notificationId)); valuesForTemplate.put("${currDay}", "%02d".formatted(day)); - valuesForTemplate.put("${currMonth}", "%02d".formatted(month)); - valuesForTemplate.put("${currYear}", "%04d".formatted(year % 100)); + valuesForTemplate.put("${currMonth}", notificationDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("ru"))); + valuesForTemplate.put("${currYear}", "%02d".formatted(year % 100)); - valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt)); + valuesForTemplate.put("${relationUpdatedAt}", dateFormatter.format(updatedAt.atZone(ZoneId.systemDefault()).toLocalDate())); valuesForTemplate.put("${companyFullName}", company.getFullName()); valuesForTemplate.put("${companyShortName}", company.getShortName()); valuesForTemplate.put("${companySymbolsINN}", companySymbols.getCompanySymbolValue()); diff --git a/clearing-parent/reports-service/src/main/resources/templates/REX_TEMPLATE.docx b/clearing-parent/reports-service/src/main/resources/templates/REX_TEMPLATE.docx index 363dc2568..6ddc9fad2 100644 Binary files a/clearing-parent/reports-service/src/main/resources/templates/REX_TEMPLATE.docx and b/clearing-parent/reports-service/src/main/resources/templates/REX_TEMPLATE.docx differ diff --git a/clearing-parent/reports-service/src/main/resources/templates/ROOT.ACTV_TEMPLATE.docx b/clearing-parent/reports-service/src/main/resources/templates/ROOT.ACTV_TEMPLATE.docx index 135d87f99..54edd36f6 100644 Binary files a/clearing-parent/reports-service/src/main/resources/templates/ROOT.ACTV_TEMPLATE.docx and b/clearing-parent/reports-service/src/main/resources/templates/ROOT.ACTV_TEMPLATE.docx differ diff --git a/clearing-parent/reports-service/src/main/resources/templates/ROOT.BLKD_TEMPLATE.docx b/clearing-parent/reports-service/src/main/resources/templates/ROOT.BLKD_TEMPLATE.docx index b5463419d..fbabbcffa 100644 Binary files a/clearing-parent/reports-service/src/main/resources/templates/ROOT.BLKD_TEMPLATE.docx and b/clearing-parent/reports-service/src/main/resources/templates/ROOT.BLKD_TEMPLATE.docx differ diff --git a/clearing-parent/reports-service/src/main/resources/templates/ROOT.CLOS_TEMPLATE.docx b/clearing-parent/reports-service/src/main/resources/templates/ROOT.CLOS_TEMPLATE.docx index e9941a6ee..6b3809572 100644 Binary files a/clearing-parent/reports-service/src/main/resources/templates/ROOT.CLOS_TEMPLATE.docx and b/clearing-parent/reports-service/src/main/resources/templates/ROOT.CLOS_TEMPLATE.docx differ diff --git a/clearing-parent/reports-service/src/main/resources/templates/ROOT.NEW_TEMPLATE.docx b/clearing-parent/reports-service/src/main/resources/templates/ROOT.NEW_TEMPLATE.docx index 1cd7ae7bd..d142c6bf0 100644 Binary files a/clearing-parent/reports-service/src/main/resources/templates/ROOT.NEW_TEMPLATE.docx and b/clearing-parent/reports-service/src/main/resources/templates/ROOT.NEW_TEMPLATE.docx differ diff --git a/clearing-parent/reports-service/src/main/resources/templates/ROOT.SSPD_TEMPLATE.docx b/clearing-parent/reports-service/src/main/resources/templates/ROOT.SSPD_TEMPLATE.docx index 65f964c52..33ff2a80f 100644 Binary files a/clearing-parent/reports-service/src/main/resources/templates/ROOT.SSPD_TEMPLATE.docx and b/clearing-parent/reports-service/src/main/resources/templates/ROOT.SSPD_TEMPLATE.docx differ diff --git a/clearing-parent/reports-service/src/main/resources/templates/RRPC_TEMPLATE.docx b/clearing-parent/reports-service/src/main/resources/templates/RRPC_TEMPLATE.docx index a5ecabd12..2dcedee3c 100644 Binary files a/clearing-parent/reports-service/src/main/resources/templates/RRPC_TEMPLATE.docx and b/clearing-parent/reports-service/src/main/resources/templates/RRPC_TEMPLATE.docx differ diff --git a/clearing-parent/reports-service/src/test/java/ru/spcex/clearing/reports/notifications/NotificationBuilderTest.java b/clearing-parent/reports-service/src/test/java/ru/spcex/clearing/reports/notifications/NotificationBuilderTest.java new file mode 100644 index 000000000..b0a5f47f7 --- /dev/null +++ b/clearing-parent/reports-service/src/test/java/ru/spcex/clearing/reports/notifications/NotificationBuilderTest.java @@ -0,0 +1,143 @@ +package ru.spcex.clearing.reports.notifications; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import ru.clearing.classes.statics.data.company.Company; +import ru.clearing.classes.statics.data.company.CompanySymbols; +import ru.clearing.classes.statics.data.company.relation.Relation; +import ru.clearing.classes.statics.data.profile.ProfileDocument; +import ru.spcex.clearing.imdg.IMDGDistributedNames; +import ru.spcex.platform.imdg.api.Imdg; +import ru.spcex.platform.imdg.api.ImdgProvider; + +import java.io.File; +import java.time.Instant; +import java.time.LocalDate; +import java.time.ZoneId; +import java.util.Arrays; +import java.util.Collections; + +import static org.mockito.Mockito.*; + +class NotificationBuilderTest { + static ImdgProvider imdgProviderMock; + static Imdg companyImdgMock; + static Company testCompany; + + static Imdg profileDocumentImdgMock; + static ProfileDocument testProfileDocument_1; + static ProfileDocument testProfileDocument_2; + + static Imdg relationImdgMock; + static Relation testRelation_1; + static Relation testRelation_2; + + static Imdg companySymbolsImdgMock; + static CompanySymbols testCompanySymbols_1; + static CompanySymbols testCompanySymbols_2; + + @BeforeAll + public static void initMocks() { + imdgProviderMock = mock(ImdgProvider.class); + + testCompany = new Company(); + testCompany.setFullName("== TEST FULL NAME =="); + testCompany.setShortName("== TEST SHORT NAME =="); + testCompany.setClearingCode("TEST_CLEARING_CODE"); + companyImdgMock = mock(Imdg.class); + when(companyImdgMock.getSingleObjectByID(any())).thenReturn(testCompany); + when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_Company), eq(Company.class))).thenReturn(companyImdgMock); + + testProfileDocument_1 = new ProfileDocument(); + testProfileDocument_1.setId(777L); + testProfileDocument_1.setCompanyId(777L); + testProfileDocument_1.setValidFromDate(LocalDate.of(2020, 1, 1)); + testProfileDocument_1.setNumber("TEST_NUMBER_1"); + testProfileDocument_2 = new ProfileDocument(); + testProfileDocument_2.setId(777L); + testProfileDocument_2.setCompanyId(777L); + testProfileDocument_2.setValidFromDate(LocalDate.of(2019, 1, 1)); + testProfileDocument_2.setNumber("TEST_NUMBER_2"); + profileDocumentImdgMock = mock(Imdg.class); + when(profileDocumentImdgMock.getCollectionObjectsBySQL(any())).thenReturn(Arrays.asList(testProfileDocument_1, testProfileDocument_2)); + when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_ProfileDocument), eq(ProfileDocument.class))).thenReturn(profileDocumentImdgMock); + + testRelation_1 = new Relation(); + testRelation_1.setId(777L); + testRelation_1.setConsumerId(777L); + testRelation_1.setUpdated(LocalDate.of(2020, 1, 1).atStartOfDay(ZoneId.systemDefault()).toInstant()); + testRelation_2 = new Relation(); + testRelation_2.setId(777L); + testRelation_2.setConsumerId(777L); + testRelation_2.setUpdated(LocalDate.of(2019, 1, 1).atStartOfDay(ZoneId.systemDefault()).toInstant()); + relationImdgMock = mock(Imdg.class); + when(relationImdgMock.getCollectionObjectsBySQL(any())).thenReturn(Arrays.asList(testRelation_1, testRelation_2)); + when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_Relation), eq(Relation.class))).thenReturn(relationImdgMock); + + testCompanySymbols_1 = new CompanySymbols(); + testCompanySymbols_1.setId(777L); + testCompanySymbols_1.setCompanyId(777L); + testCompanySymbols_1.setCompanySymbol("TEST_COMPANY_SYMBOL_1"); + testCompanySymbols_1.setCompanySymbolValue("TEST_COMPANY_SYMBOL_VALUE_1"); + testCompanySymbols_2 = new CompanySymbols(); + testCompanySymbols_2.setId(777L); + testCompanySymbols_2.setCompanyId(777L); + testCompanySymbols_2.setCompanySymbol("TEST_COMPANY_SYMBOL_2"); + testCompanySymbols_2.setCompanySymbolValue("TEST_COMPANY_SYMBOL_VALUE_2"); + companySymbolsImdgMock = mock(Imdg.class); + when(companySymbolsImdgMock.getCollectionObjectsBySQL(any())).thenReturn(Arrays.asList(testCompanySymbols_1, testCompanySymbols_2)); + when(imdgProviderMock.getImdg(eq(IMDGDistributedNames.Map_CompanySymbols), eq(CompanySymbols.class))).thenReturn(companySymbolsImdgMock); + + } + + @Test + public void testREX() { + REXNotificationBuilder rexNotificationBuilder = new REXNotificationBuilder(imdgProviderMock); + File outputFile = rexNotificationBuilder.buildNotification(777L); + outputFile.delete(); + } + + @Test + public void testRRPC() { + RRPCNotificationBuilder rrpcNotificationBuilder = new RRPCNotificationBuilder(imdgProviderMock); + File outputFile = rrpcNotificationBuilder.buildNotification(777L); + outputFile.delete(); + } + + @Test + public void testROOT_ACTV() { + ROOT_ACTV_NotificationBuilder root_actv_notificationBuilder = new ROOT_ACTV_NotificationBuilder(imdgProviderMock); + File outputFile = root_actv_notificationBuilder.buildNotification(777L); + outputFile.delete(); + } + + @Test + public void testROOT_BLKD() { + ROOT_BLKD_NotificationBuilder root_actv_notificationBuilder = new ROOT_BLKD_NotificationBuilder(imdgProviderMock); + File outputFile = root_actv_notificationBuilder.buildNotification(777L); + outputFile.delete(); + } + + @Test + public void testROOT_CLOS() { + ROOT_CLOS_NotificationBuilder root_actv_notificationBuilder = new ROOT_CLOS_NotificationBuilder(imdgProviderMock); + File outputFile = root_actv_notificationBuilder.buildNotification(777L); + outputFile.delete(); + } + + @Test + public void testROOT_NEW() { + ROOT_NEW_NotificationBuilder root_actv_notificationBuilder = new ROOT_NEW_NotificationBuilder(imdgProviderMock); + File outputFile = root_actv_notificationBuilder.buildNotification(777L); + outputFile.delete(); + } + + @Test + public void testROOT_SSPD() { + ROOT_SSPD_NotificationBuilder root_actv_notificationBuilder = new ROOT_SSPD_NotificationBuilder(imdgProviderMock); + File outputFile = root_actv_notificationBuilder.buildNotification(777L); + outputFile.delete(); + } + + +} \ No newline at end of file