Skip to content

Commit

Permalink
fix: municipality merger in syndication
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Oct 2, 2024
1 parent d9b9d71 commit 9b2261b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ public enum MunicipalityEvent
MunicipalityWasCorrectedToCurrent,
MunicipalityWasRetired,
MunicipalityWasCorrectedToRetired,

MunicipalityWasMerged
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<SyndicationContent<Gemeente>> entry, SyndicationContext context, CancellationToken ct)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 9b2261b

Please sign in to comment.