diff --git a/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityEvent.cs b/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityEvent.cs index 2e32e9d44..136daeb24 100644 --- a/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityEvent.cs +++ b/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityEvent.cs @@ -18,5 +18,7 @@ public enum MunicipalityEvent MunicipalityWasCorrectedToCurrent, MunicipalityWasRetired, MunicipalityWasCorrectedToRetired, + + MunicipalityWasMerged } } diff --git a/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityLatestProjections.cs b/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityLatestProjections.cs index bea5cbed2..d2afef749 100755 --- a/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityLatestProjections.cs +++ b/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalityLatestProjections.cs @@ -23,6 +23,7 @@ public MunicipalityLatestProjections() When(MunicipalityEvent.MunicipalityOfficialLanguageWasRemoved, AddSyndicationItemEntry); When(MunicipalityEvent.MunicipalityFacilitiesLanguageWasAdded, AddSyndicationItemEntry); When(MunicipalityEvent.MunicipalityFacilitiesLanguageWasRemoved, AddSyndicationItemEntry); + When(MunicipalityEvent.MunicipalityWasMerged, AddSyndicationItemEntry); } private static async Task AddSyndicationItemEntry(AtomEntry> entry, SyndicationContext context, CancellationToken ct) diff --git a/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalitySyndicationProjections.cs b/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalitySyndicationProjections.cs index 16684a9e8..bb5c75a72 100644 --- a/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalitySyndicationProjections.cs +++ b/src/StreetNameRegistry.Projections.Syndication/Municipality/MunicipalitySyndicationProjections.cs @@ -18,6 +18,7 @@ public MunicipalitySyndicationProjections() When(MunicipalityEvent.MunicipalityNameWasCleared, AddSyndicationItemEntry); When(MunicipalityEvent.MunicipalityNameWasCorrected, AddSyndicationItemEntry); When(MunicipalityEvent.MunicipalityNameWasCorrectedToCleared, AddSyndicationItemEntry); + When(MunicipalityEvent.MunicipalityWasMerged, AddSyndicationItemEntry); //these events only update version timestamp & position When(MunicipalityEvent.MunicipalityOfficialLanguageWasAdded, AddSyndicationItemEntry); diff --git a/test/StreetNameRegistry.Tests/ProjectionTests/MunicipalityAtomEntryProjectionsTests.cs b/test/StreetNameRegistry.Tests/ProjectionTests/MunicipalityAtomEntryProjectionsTests.cs index 761a40003..0eb4788cf 100755 --- a/test/StreetNameRegistry.Tests/ProjectionTests/MunicipalityAtomEntryProjectionsTests.cs +++ b/test/StreetNameRegistry.Tests/ProjectionTests/MunicipalityAtomEntryProjectionsTests.cs @@ -26,6 +26,7 @@ public MunicipalityAtomEntryProjectionsTests(ITestOutputHelper output) : base(ou [InlineData(MunicipalityEvent.MunicipalityNameWasCorrectedToCleared)] [InlineData(MunicipalityEvent.MunicipalityNisCodeWasDefined)] [InlineData(MunicipalityEvent.MunicipalityNisCodeWasCorrected)] + [InlineData(MunicipalityEvent.MunicipalityWasMerged)] public async Task MunicipalityEventInsertsRecord(MunicipalityEvent @event) { var id = Arrange(Produce.Guid());