Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: or-2334 return dubbele vereniging as teVerwijderen for publiek … #1034

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public string SerializeToJson(PubliekVerenigingDetailDocument vereniging)
private static bool IsTeVerwijderenVereniging(PubliekVerenigingDetailDocument vereniging)
=> vereniging.Deleted ||
vereniging.Status == VerenigingStatus.Gestopt ||
vereniging.Status == VerenigingStatus.Dubbel ||
vereniging.IsUitgeschrevenUitPubliekeDatastroom is not null &&
vereniging.IsUitgeschrevenUitPubliekeDatastroom.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ namespace AssociationRegistry.Test.E2E.Framework.AlbaHost;
using Admin.Api.Verenigingen.Historiek.ResponseModels;
using Admin.Api.Verenigingen.Search.ResponseModels;
using Alba;
using Newtonsoft.Json;

public static class AdminApiEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.Framework.AlbaHost;

using Alba;
using Common.Clients;
using Common.Fixtures;
using IdentityModel.AspNetCore.OAuth2Introspection;
using Microsoft.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.Framework.AlbaHost;

using Newtonsoft.Json.Linq;
using Public.Api.Verenigingen.Detail;
using Public.Api.Verenigingen.Detail.ResponseModels;
using Public.Api.Verenigingen.DetailAll;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
using Amazon.SQS;
using AssociationRegistry.Framework;
using Common.Clients;
using Hosts.Configuration.ConfigurationBindings;
using IdentityModel.AspNetCore.OAuth2Introspection;
using JasperFx.RuntimeCompiler.Scenarios;
using Marten;
using Marten.Events;
using Microsoft.AspNetCore.Hosting;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace AssociationRegistry.Test.E2E.Framework.Comparison;

using Admin.Api.Verenigingen.Detail.ResponseModels;
using Bogus;
using FluentAssertions.Equivalency;

public class AdminDetailComparisonConfig : End2EndComparisonConfig
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Admin.Api.Verenigingen.Lidmaatschap.WijzigLidmaatschap.RequestModels;
using Admin.Api.Verenigingen.Search.ResponseModels;
using Admin.Api.Verenigingen.WijzigBasisgegevens.FeitelijkeVereniging.RequestModels;
using Admin.ProjectionHost.Infrastructure.Extensions;
using Events;
using Formats;
using JsonLdContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public static HistoriekGebeurtenisResponse LidmaatschapWerdGewijzigd(WijzigLidma
=> new()
{
Beschrijving = $"Vereniging werd gemarkeerd als dubbel van {request.IsDubbelVan}.",
Gebeurtenis = nameof(Events.VerenigingWerdGemarkeerdAlsDubbelVan),
Gebeurtenis = nameof(VerenigingWerdGemarkeerdAlsDubbelVan),
Data = new
{
VCode = vCode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace AssociationRegistry.Test.E2E.Scenarios.Givens.FeitelijkeVereniging;
using AssociationRegistry.Test.Common.AutoFixture;
using Vereniging;
using AutoFixture;
using Requests.FeitelijkeVereniging;

public class MultipleWerdGeregistreerdScenario : Framework.TestClasses.IScenario
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace AssociationRegistry.Test.E2E.When_Markeer_Als_Dubbel_Van.Beheer.DetailAuthentiekeVereniging;

using AssociationRegistry.Admin.Api.Verenigingen.Detail.ResponseModels;
using AssociationRegistry.Admin.Schema.Constants;
using AssociationRegistry.Test.E2E.Framework.AlbaHost;
using Admin.Schema.Constants;
using Framework.AlbaHost;
using FluentAssertions;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
namespace AssociationRegistry.Test.E2E.When_Markeer_Als_Dubbel_Van.Beheer.HistoriekAuthentiekeVereniging;

using AssociationRegistry.Admin.Api.Verenigingen.Dubbels.FeitelijkeVereniging.MarkeerAlsDubbelVan.RequestModels;
using Admin.Api.Verenigingen.Dubbels.FeitelijkeVereniging.MarkeerAlsDubbelVan.RequestModels;
using AssociationRegistry.Admin.Api.Verenigingen.Historiek.ResponseModels;
using AssociationRegistry.Events;
using AssociationRegistry.Test.E2E.Framework.AlbaHost;
using AssociationRegistry.Test.E2E.Framework.ApiSetup;
using AssociationRegistry.Test.E2E.Framework.Comparison;
using AssociationRegistry.Test.E2E.Framework.Mappers;
using AssociationRegistry.Test.E2E.Framework.TestClasses;
using Events;
using Framework.AlbaHost;
using Framework.ApiSetup;
using Framework.Comparison;
using Framework.Mappers;
using Framework.TestClasses;
using KellermanSoftware.CompareNetObjects;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace AssociationRegistry.Test.E2E.When_Markeer_Als_Dubbel_Van.Beheer.ZoekenAuthentiekeVereniging;

using AssociationRegistry.Admin.Api.Verenigingen.Dubbels.FeitelijkeVereniging.MarkeerAlsDubbelVan.RequestModels;
using AssociationRegistry.Admin.Api.Verenigingen.Search.ResponseModels;
using AssociationRegistry.Events;
using AssociationRegistry.Test.E2E.Framework.AlbaHost;
using AssociationRegistry.Test.E2E.Framework.ApiSetup;
using AssociationRegistry.Test.E2E.Framework.TestClasses;
using Admin.Api.Verenigingen.Dubbels.FeitelijkeVereniging.MarkeerAlsDubbelVan.RequestModels;
using Admin.Api.Verenigingen.Search.ResponseModels;
using Framework.AlbaHost;
using Framework.ApiSetup;
using Framework.TestClasses;
using FluentAssertions;
using KellermanSoftware.CompareNetObjects;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

using FluentAssertions;
using Framework.AlbaHost;
using global::OpenTelemetry.Trace;
using Public.Api.Verenigingen.Detail.ResponseModels;
using Public.Schema.Constants;
using System.Net;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace AssociationRegistry.Test.E2E.When_Markeer_Als_Dubbel_Van.Publiek.Detail_All;

using Admin.Api.Verenigingen.Dubbels.FeitelijkeVereniging.MarkeerAlsDubbelVan.RequestModels;
using Formats;
using Public.Api.Verenigingen.DetailAll;
using Framework.AlbaHost;
using Framework.ApiSetup;
using Framework.TestClasses;
using FluentAssertions;
using Newtonsoft.Json.Linq;
using NodaTime.Extensions;
using Xunit;

[Collection(FullBlownApiCollection.Name)]
public class Returns_ArrayOfDetailResponses : End2EndTest<MarkeerAlsDubbelVanContext, MarkeerAlsDubbelVanRequest, IEnumerable<JObject>>
{
public override Func<IApiSetup, IEnumerable<JObject>> GetResponse =>
setup => setup.PublicApiHost.GetPubliekDetailAll();

public Returns_ArrayOfDetailResponses(MarkeerAlsDubbelVanContext context) : base(context)
{
}

[Fact]
public void WithVereniging()
=> Response.OnlyTeVerwijderen()
.Should()
.ContainEquivalentOf(new DetailAllConverter.TeVerwijderenVereniging()
{
Vereniging = new DetailAllConverter.TeVerwijderenVereniging.TeVerwijderenVerenigingData()
{
VCode = TestContext.VCode,
TeVerwijderen = true,
DeletedAt = DateTime.UtcNow.Date.ToInstant().FormatAsBelgianDate(),
},
});
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
namespace AssociationRegistry.Test.E2E.When_Messages_Are_Queued.Via_Postgres;

using Amazon.SQS.Model;
using AssociationRegistry.Grar.AddressMatch;
using AssociationRegistry.Hosts.Configuration;
using AssociationRegistry.Test.Common.AutoFixture;
using AssociationRegistry.Test.E2E.Framework.ApiSetup;
using Framework.ApiSetup;
using AutoFixture;
using FluentAssertions;
using Marten;
using Marten.Internal.Storage;
using Messages;
using Microsoft.Extensions.DependencyInjection;
using Vereniging.Exceptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace AssociationRegistry.Test.E2E.When_Messages_Are_Queued.Via_SQS;

using Amazon.SQS.Model;
using AssociationRegistry.Grar.AddressMatch;
using AssociationRegistry.Hosts.Configuration;
using Grar.AddressMatch;
using Hosts.Configuration;
using AssociationRegistry.Test.Common.AutoFixture;
using AssociationRegistry.Test.E2E.Framework.ApiSetup;
using Framework.ApiSetup;
using AutoFixture;
using FluentAssertions;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace AssociationRegistry.Test.E2E.When_Messages_Are_Queued.Via_SQS;

using Amazon.SQS.Model;
using AssociationRegistry.Acties.GrarConsumer;
using AssociationRegistry.Hosts.Configuration;
using Acties.GrarConsumer;
using Hosts.Configuration;
using AssociationRegistry.Test.Common.AutoFixture;
using AssociationRegistry.Test.E2E.Framework.ApiSetup;
using Framework.ApiSetup;
using AutoFixture;
using FluentAssertions;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using AssociationRegistry.Admin.Api.Verenigingen.Common;
using AssociationRegistry.Admin.Api.Verenigingen.Detail.ResponseModels;
using Admin.Api.Verenigingen.Registreer.FeitelijkeVereniging.RequetsModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using AssociationRegistry.Admin.Api.Verenigingen.Common;
using Admin.Api.Verenigingen.Registreer.FeitelijkeVereniging.RequetsModels;
using Admin.Api.Verenigingen.Search.ResponseModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using AssociationRegistry.Admin.Api.Verenigingen.Common;
using Admin.Api.Verenigingen.Registreer.FeitelijkeVereniging.RequetsModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using AssociationRegistry.Public.Api.Verenigingen.Detail.ResponseModels;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using AssociationRegistry.Admin.Api.Verenigingen.Common;
using Admin.Api.Verenigingen.Registreer.FeitelijkeVereniging.RequetsModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using AssociationRegistry.Public.Api.Verenigingen.Detail.ResponseModels;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using AssociationRegistry.Admin.Api.Verenigingen.Common;
using AssociationRegistry.Admin.Api.Verenigingen.Detail.ResponseModels;
using Admin.Api.Verenigingen.Registreer.FeitelijkeVereniging.RequetsModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Stop_Vereniging.Publiek.Detail_All;

using Admin.Api.Verenigingen.Stop.RequestModels;
using Public.Api.Verenigingen.Detail;
using Public.ProjectionHost.Infrastructure.Extensions;
using Framework.AlbaHost;
using Framework.ApiSetup;
using Framework.TestClasses;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public void Returns_Werkingsgebieden()
{
var result = _apiSetup.PublicApiHost.GetWerkingsgebieden();
result.Werkingsgebieden.Should().NotBeEmpty();
result.Werkingsgebieden.Length.Should().Be(AssociationRegistry.Vereniging.Werkingsgebied.AllWithNVT.Length);
result.Werkingsgebieden.Length.Should().Be(Vereniging.Werkingsgebied.AllWithNVT.Length);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using FluentAssertions;
using Framework.AlbaHost;
using KellermanSoftware.CompareNetObjects;
using When_Voeg_Lidmaatschap_Toe;
using Xunit;

[Collection(FullBlownApiCollection.Name)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Verwijder_Lidmaatschap.Beheer.Zoeken;

using Admin.Api.Verenigingen.Search.ResponseModels;
using Admin.ProjectionHost.Infrastructure.Extensions;
using Admin.Schema.Constants;
using Events;
using Formats;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Voeg_Lidmaatschap_Toe.Beheer.Detail;

using Admin.Api.Verenigingen.Detail.ResponseModels;
using Admin.ProjectionHost.Infrastructure.Extensions;
using Formats;
using Framework.AlbaHost;
using JsonLdContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

using Admin.Api.Verenigingen.Lidmaatschap.VoegLidmaatschapToe.RequestModels;
using Admin.Api.Verenigingen.Search.ResponseModels;
using Admin.ProjectionHost.Infrastructure.Extensions;
using Admin.Schema.Constants;
using Events;
using Formats;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using JsonLdContext;
using KellermanSoftware.CompareNetObjects;
using Public.Api.Verenigingen.Detail.ResponseModels;
using Public.ProjectionHost.Infrastructure.Extensions;
using Xunit;
using Lidmaatschap = Public.Api.Verenigingen.Detail.ResponseModels.Lidmaatschap;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Voeg_Lidmaatschap_Toe.Publiek.Zoeken;

using Admin.Api.Verenigingen.Lidmaatschap.VoegLidmaatschapToe.RequestModels;
using Admin.ProjectionHost.Infrastructure.Extensions;
using Events;
using Framework.AlbaHost;
using Framework.ApiSetup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using AssociationRegistry.Admin.Api.Verenigingen.Detail.ResponseModels;
using Admin.Api.Verenigingen.WijzigBasisgegevens.FeitelijkeVereniging.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using Admin.Api.Verenigingen.Search.ResponseModels;
using Admin.Api.Verenigingen.WijzigBasisgegevens.FeitelijkeVereniging.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Wijzig_Basisgegevens.Publiek.Detail;

using Admin.Api.Verenigingen.WijzigBasisgegevens.FeitelijkeVereniging.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using AssociationRegistry.Public.Api.Verenigingen.Detail.ResponseModels;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Wijzig_Basisgegevens.Publiek.Detail_All;

using Admin.Api.Verenigingen.WijzigBasisgegevens.FeitelijkeVereniging.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using AssociationRegistry.Public.Api.Verenigingen.Detail.ResponseModels;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using AssociationRegistry.Admin.Api.Verenigingen.Detail.ResponseModels;
using Admin.Api.Verenigingen.WijzigBasisgegevens.MetRechtspersoonlijkheid.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using Admin.Api.Verenigingen.Search.ResponseModels;
using Admin.Api.Verenigingen.WijzigBasisgegevens.MetRechtspersoonlijkheid.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using Framework.AlbaHost;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Wijzig_Basisgegevens_Kbo.Publiek.Detail;

using Admin.Api.Verenigingen.WijzigBasisgegevens.MetRechtspersoonlijkheid.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using AssociationRegistry.Public.Api.Verenigingen.Detail.ResponseModels;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Wijzig_Basisgegevens_Kbo.Publiek.Detail_All;

using Admin.Api.Verenigingen.WijzigBasisgegevens.MetRechtspersoonlijkheid.RequestModels;
using Admin.Schema.Constants;
using Formats;
using JsonLdContext;
using AssociationRegistry.Public.Api.Verenigingen.Detail.ResponseModels;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace AssociationRegistry.Test.E2E.When_Wijzig_Lidmaatschap.Beheer.Detail;

using Admin.Api.Verenigingen.Detail.ResponseModels;
using Admin.ProjectionHost.Infrastructure.Extensions;
using Formats;
using Framework.AlbaHost;
using JsonLdContext;
Expand Down
Loading
Loading