Adds Generic CommandHandlerDecorator

This commit is contained in:
Janus C. H. Knudsen 2025-03-12 00:13:53 +01:00
parent 49f9b99ee1
commit 64e696dc5a
21 changed files with 131 additions and 110 deletions

View file

@ -2,6 +2,7 @@ using Autofac;
using Insight.Database;
using PlanTempus.Components;
using PlanTempus.Components.Users.Create;
using PlanTempus.Core.CommandQueries;
using PlanTempus.Core.Database;
using PlanTempus.Core.Database.ConnectionFactory;
using Shouldly;
@ -24,13 +25,13 @@ public class HandlerTest : TestFixture
var command = new CreateUserCommand
{
Email = "lloyd@dumbanddumber.com1", // Lloyd Christmas
Email = "lloyd@dumbanddumber.com3", // Lloyd Christmas
Password = "1234AceVentura#LOL", // Ace Ventura
IsActive = true,
CorrelationId = Guid.NewGuid()
};
var result = await commandHandler.Handle<CreateUserCommand, CreateUserResult>(command);
var result = await commandHandler.Handle(command);
result.ShouldNotBeNull();
}