diff --git a/src/AssociationRegistry.Admin.Api/GrarConsumer/Finders/LocatieMetVCode.cs b/src/AssociationRegistry.Admin.Api/GrarConsumer/Finders/LocatieMetVCode.cs deleted file mode 100644 index 9de75bde0..000000000 --- a/src/AssociationRegistry.Admin.Api/GrarConsumer/Finders/LocatieMetVCode.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace AssociationRegistry.Admin.Api.GrarConsumer.Finders; - -public record LocatieMetVCode(string VCode, int LocatieId); diff --git a/src/AssociationRegistry.Admin.Api/Infrastructure/Extensions/WolverineExtensions.cs b/src/AssociationRegistry.Admin.Api/Infrastructure/Extensions/WolverineExtensions.cs index 9cad3b73f..374249319 100644 --- a/src/AssociationRegistry.Admin.Api/Infrastructure/Extensions/WolverineExtensions.cs +++ b/src/AssociationRegistry.Admin.Api/Infrastructure/Extensions/WolverineExtensions.cs @@ -4,10 +4,8 @@ using Acties.GrarConsumer.HeradresseerLocaties; using Acties.GrarConsumer.OntkoppelAdres; using Amazon.Runtime; -using Amazon.SQS.Model; using EventStore; using Grar.AddressMatch; -using Grar.GrarUpdates.Fusies.TeHeradresserenLocaties; using Hosts.Configuration; using JasperFx.CodeGeneration; using Serilog; @@ -15,8 +13,6 @@ using Wolverine; using Wolverine.AmazonSqs; using Wolverine.ErrorHandling; -using Wolverine.Runtime.Routing; -using Wolverine.Runtime.Serialization; public static class WolverineExtensions { @@ -31,13 +27,8 @@ public static void AddWolverine(this WebApplicationBuilder builder) options.Discovery.IncludeAssembly(typeof(Vereniging).Assembly); options.Discovery.IncludeType(); options.Discovery.IncludeType(); - options.Discovery.IncludeType(); - options.Discovery.IncludeType(); - options.Discovery.IncludeType(); - options.Discovery.IncludeType(); options.Discovery.IncludeType(); - options.Discovery.IncludeType(); - + options.Discovery.IncludeType(); options.OnException().RetryWithCooldown( TimeSpan.FromSeconds(1), @@ -118,7 +109,6 @@ private static void ConfigureGrarSyncListener( { configure.MaxNumberOfMessages = 1; configure.DeadLetterQueueName = sqsDeadLetterQueueName; - configure.RegisterSerializer(new MySerializer()); }) .ConfigureDeadLetterQueue(sqsDeadLetterQueueName) .ReceiveRawJsonMessage(typeof(OverkoepelendeGrarConsumerMessage)) @@ -126,29 +116,3 @@ private static void ConfigureGrarSyncListener( } } -internal class MySerializer : IntrinsicSerializer -{ - public byte[] Write(Envelope envelope) - { - return base.Write(envelope); - } - - public object ReadFromData(Type messageType, Envelope envelope) - { - return base.ReadFromData(messageType, envelope); - } - - public object ReadFromData(byte[] data) - { - return base.ReadFromData(data); - - } - - public byte[] WriteMessage(object message) - { - return base.WriteMessage(message); - } - - public string ContentType { get; } -} - diff --git a/src/AssociationRegistry/Acties/GrarConsumer/HeradresseerLocaties/HeradresseerLocatiesMessageHandler.cs b/src/AssociationRegistry/Acties/GrarConsumer/HeradresseerLocaties/HeradresseerLocatiesMessageHandler.cs index 8ff37bcb0..cc94d9b79 100644 --- a/src/AssociationRegistry/Acties/GrarConsumer/HeradresseerLocaties/HeradresseerLocatiesMessageHandler.cs +++ b/src/AssociationRegistry/Acties/GrarConsumer/HeradresseerLocaties/HeradresseerLocatiesMessageHandler.cs @@ -10,24 +10,6 @@ namespace AssociationRegistry.Acties.GrarConsumer.HeradresseerLocaties; using NodaTime; using Wolverine; -public class StringHandler -{ - private readonly IVerenigingsRepository _repository; - private readonly IGrarClient _client; - - public StringHandler(IVerenigingsRepository repository, IGrarClient client) - { - _repository = repository; - _client = client; - } - - public async Task Handle(HeradresseerLocatiesMessage message, Envelope envelope, CancellationToken cancellationToken) - { - var asJson = JsonConvert.SerializeObject(message); - var back1 = JsonConvert.DeserializeObject(asJson); - } -} - public class HeradresseerLocatiesMessageHandler { private readonly IVerenigingsRepository _repository; diff --git a/src/AssociationRegistry/Grar/GrarUpdates/Hernummering/TeHeradresserenLocatiesMapper.cs b/src/AssociationRegistry/Grar/GrarUpdates/Hernummering/TeHeradresserenLocatiesMapper.cs index 5d66c6226..aa8b52e14 100644 --- a/src/AssociationRegistry/Grar/GrarUpdates/Hernummering/TeHeradresserenLocatiesMapper.cs +++ b/src/AssociationRegistry/Grar/GrarUpdates/Hernummering/TeHeradresserenLocatiesMapper.cs @@ -1,7 +1,7 @@ namespace AssociationRegistry.Grar.GrarUpdates.Hernummering; using Acties.GrarConsumer.HeradresseerLocaties; -using AssociationRegistry.Grar.GrarUpdates.LocatieFinder; +using LocatieFinder; public class TeHeradresserenLocatiesMapper { diff --git a/src/AssociationRegistry/Grar/GrarUpdates/LocatieFinder/ILocatieFinder.cs b/src/AssociationRegistry/Grar/GrarUpdates/LocatieFinder/ILocatieFinder.cs index c50b6d10a..b0f5a4e18 100644 --- a/src/AssociationRegistry/Grar/GrarUpdates/LocatieFinder/ILocatieFinder.cs +++ b/src/AssociationRegistry/Grar/GrarUpdates/LocatieFinder/ILocatieFinder.cs @@ -4,6 +4,5 @@ public interface ILocatieFinder { Task FindLocaties(params int[] adresIds); Task FindLocaties(params string[] adresIds); - Task> FindLocatieLookupDocuments(string[] adresIds); } diff --git a/test/AssociationRegistry.Test.Admin.Api/GrarConsumer/ReAddressEvents/When_Mapping_ReaddressedData/FakeLocatieFinder.cs b/test/AssociationRegistry.Test.Admin.Api/GrarConsumer/ReAddressEvents/When_Mapping_ReaddressedData/FakeLocatieFinder.cs deleted file mode 100644 index d599eceab..000000000 --- a/test/AssociationRegistry.Test.Admin.Api/GrarConsumer/ReAddressEvents/When_Mapping_ReaddressedData/FakeLocatieFinder.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace AssociationRegistry.Test.Admin.Api.GrarConsumer.ReAddressEvents.When_Mapping_ReaddressedData; - -using AssociationRegistry.Admin.Api.GrarConsumer.Finders; -using AssociationRegistry.Admin.Schema.Detail; -using Grar.GrarUpdates; -using Grar.GrarUpdates.LocatieFinder; - -public class FakeLocatieFinder : ILocatieFinder -{ - private readonly List _locatieLookupDocuments; - - public FakeLocatieFinder(List locatieLookupDocuments) - { - _locatieLookupDocuments = locatieLookupDocuments; - } - - public async Task> FindLocatieLookupDocuments(string[] adresIds) - => _locatieLookupDocuments.Where(x => adresIds.Contains(x.AdresId)) - .Select(x => new LocatieLookupData(x.LocatieId, x.AdresId, x.VCode)) - .ToList(); - - public async Task FindLocaties(params int[] adresIds) - => throw new NotImplementedException(); - - async Task ILocatieFinder.FindLocaties(params string[] adresIds) - => throw new NotImplementedException(); -} - -public record LocatieLookupMetExpectedAdres(LocatieLookupDocument Document, string ExpectedAdresId); diff --git a/test/AssociationRegistry.Test.Admin.Api/GrarConsumer/StubLocatieFinder.cs b/test/AssociationRegistry.Test.Admin.Api/GrarConsumer/StubLocatieFinder.cs index bacb74e8a..d07095f7d 100644 --- a/test/AssociationRegistry.Test.Admin.Api/GrarConsumer/StubLocatieFinder.cs +++ b/test/AssociationRegistry.Test.Admin.Api/GrarConsumer/StubLocatieFinder.cs @@ -1,8 +1,5 @@ namespace AssociationRegistry.Test.Admin.Api.GrarConsumer; -using AssociationRegistry.Admin.Api.GrarConsumer.Finders; -using AssociationRegistry.Admin.Schema.Detail; -using Grar.GrarUpdates; using Grar.GrarUpdates.LocatieFinder; public class StubLocatieFinder : ILocatieFinder