From 639c131b3fdb074e5c3623a27214f92253937888 Mon Sep 17 00:00:00 2001 From: emalfroy Date: Mon, 6 Jan 2025 19:11:43 +0100 Subject: [PATCH] feat: or-1716 implement publiek detail for corrigeer dubbels --- .../Detail/PubliekVerenigingDetailProjection.cs | 2 ++ .../Detail/PubliekVerenigingDetailProjector.cs | 5 +++++ .../Given_MarkeringDubbeleVerengingWerdGecorrigeerd.cs | 10 ++++++++++ 3 files changed, 17 insertions(+) create mode 100644 test/AssociationRegistry.Test.Projections/Publiek/Detail/Dubbels/Given_MarkeringDubbeleVerengingWerdGecorrigeerd.cs diff --git a/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjection.cs b/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjection.cs index a87ef85d9..6c580d553 100644 --- a/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjection.cs +++ b/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjection.cs @@ -216,6 +216,8 @@ public async Task Project(IEvent @event, I public async Task Project(IEvent @event, IDocumentOperations ops) => await Update(@event, ops, PubliekVerenigingDetailProjector.Apply); + public async Task Project(IEvent @event, IDocumentOperations ops) + => await Update(@event, ops, PubliekVerenigingDetailProjector.Apply); private static async Task Update( IEvent @event, diff --git a/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjector.cs b/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjector.cs index 799e8aad1..91efc0aba 100644 --- a/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjector.cs +++ b/src/AssociationRegistry.Public.ProjectionHost/Projections/Detail/PubliekVerenigingDetailProjector.cs @@ -786,4 +786,9 @@ public static void Apply(IEvent markeringDubbeleVerengingWerdGecorrigeerd, PubliekVerenigingDetailDocument document) + { + document.Status = markeringDubbeleVerengingWerdGecorrigeerd.Data.VorigeStatus; + } } diff --git a/test/AssociationRegistry.Test.Projections/Publiek/Detail/Dubbels/Given_MarkeringDubbeleVerengingWerdGecorrigeerd.cs b/test/AssociationRegistry.Test.Projections/Publiek/Detail/Dubbels/Given_MarkeringDubbeleVerengingWerdGecorrigeerd.cs new file mode 100644 index 000000000..3909e2df3 --- /dev/null +++ b/test/AssociationRegistry.Test.Projections/Publiek/Detail/Dubbels/Given_MarkeringDubbeleVerengingWerdGecorrigeerd.cs @@ -0,0 +1,10 @@ +namespace AssociationRegistry.Test.Projections.Publiek.Detail.Dubbels; + +[Collection(nameof(ProjectionContext))] +public class Given_MarkeringDubbeleVerengingWerdGecorrigeerd(PubliekDetailScenarioFixture fixture) + : PubliekDetailScenarioClassFixture +{ + [Fact] + public void Document_Status_Is_Dubbel() + => fixture.Result.Status.Should().Be(fixture.Scenario.MarkeringDubbeleVerengingWerdGecorrigeerd.VorigeStatus); +}