diff --git a/src/MunicipalityRegistry.Api.Import/Merger/Propose/ProposeMergersRequestValidator.cs b/src/MunicipalityRegistry.Api.Import/Merger/Propose/ProposeMergersRequestValidator.cs index a9a45c66..ff20485f 100644 --- a/src/MunicipalityRegistry.Api.Import/Merger/Propose/ProposeMergersRequestValidator.cs +++ b/src/MunicipalityRegistry.Api.Import/Merger/Propose/ProposeMergersRequestValidator.cs @@ -10,7 +10,7 @@ public sealed class ProposeMergersRequestValidator : AbstractValidator request.MergerYear) - .GreaterThan(DateTime.Now.Year) + .GreaterThanOrEqualTo(DateTime.Now.Year) .DependentRules(() => { RuleFor(request => request.MergerYear) diff --git a/src/MunicipalityRegistry.Producer.Snapshot.Oslo/Infrastructure/Modules/ProducerModule.cs b/src/MunicipalityRegistry.Producer.Snapshot.Oslo/Infrastructure/Modules/ProducerModule.cs index bef8dd42..cb20a45b 100644 --- a/src/MunicipalityRegistry.Producer.Snapshot.Oslo/Infrastructure/Modules/ProducerModule.cs +++ b/src/MunicipalityRegistry.Producer.Snapshot.Oslo/Infrastructure/Modules/ProducerModule.cs @@ -59,6 +59,8 @@ private void RegisterProjectionSetup(ContainerBuilder builder) .RegisterEventstreamModule(_configuration) .RegisterModule(new ProjectorModule(_configuration)); + _services.AddOsloProxy(_configuration["OsloApiUrl"]); + RegisterProjections(builder); } diff --git a/src/MunicipalityRegistry.Producer/Infrastructure/Program.cs b/src/MunicipalityRegistry.Producer/Infrastructure/Program.cs index 7d0a9258..e842f9dd 100644 --- a/src/MunicipalityRegistry.Producer/Infrastructure/Program.cs +++ b/src/MunicipalityRegistry.Producer/Infrastructure/Program.cs @@ -34,7 +34,7 @@ public static async Task Main(string[] args) AppDomain.CurrentDomain.UnhandledException += (_, eventArgs) => Log.Fatal((Exception)eventArgs.ExceptionObject, "Encountered a fatal exception, exiting program."); - Log.Information("Initializing ParcelRegistry.Producer"); + Log.Information("Initializing MunicipalityRegistry.Producer"); var host = new HostBuilder() .ConfigureAppConfiguration((_, configurationBuilder) => @@ -120,7 +120,7 @@ public static async Task Main(string[] args) .UseConsoleLifetime() .Build(); - Log.Information("Starting ParcelRegistry.Producer"); + Log.Information("Starting MunicipalityRegistry.Producer"); var logger = host.Services.GetRequiredService>(); var configuration = host.Services.GetRequiredService(); diff --git a/test/MunicipalityRegistry.Tests/ImportApi/Merger/Propose/WhenProposingMerger.cs b/test/MunicipalityRegistry.Tests/ImportApi/Merger/Propose/WhenProposingMerger.cs index 8d2ab1fa..294b0cc9 100644 --- a/test/MunicipalityRegistry.Tests/ImportApi/Merger/Propose/WhenProposingMerger.cs +++ b/test/MunicipalityRegistry.Tests/ImportApi/Merger/Propose/WhenProposingMerger.cs @@ -63,7 +63,7 @@ public async Task GivenValidRequestWithNewDestinationMunicipality_ThenMunicipali var request = new ProposeMergersRequest { - MergerYear = 2025, + MergerYear = DateTime.Now.Year + 1, Municipalities = [ new ProposeMergerRequest @@ -147,7 +147,7 @@ public async Task GivenValidRequestWithExistingDestinationMunicipality_ThenMunic var request = new ProposeMergersRequest { - MergerYear = 2025, + MergerYear = DateTime.Now.Year + 1, Municipalities = [ new ProposeMergerRequest