Working on a command dispatcher

This commit is contained in:
Janus Knudsen 2025-03-10 18:10:00 +01:00
parent 31666b4ba0
commit a86a2d7ade
5 changed files with 55 additions and 4 deletions

View file

@ -0,0 +1,33 @@
using Autofac;
using Insight.Database;
using PlanTempus.Components;
using PlanTempus.Components.Users.Create;
using PlanTempus.Core.Database;
using PlanTempus.Core.Database.ConnectionFactory;
namespace PlanTempus.X.TDD.CommandQueryHandlerTests;
[TestClass]
public class HandlerTest : TestFixture
{
[TestInitialize]
public void This()
{
}
[TestMethod]
public void TestDefaultConnection()
{
var commandHandler = Container.Resolve<CommandHandler>();
var command = new CreateUserCommand
{
Email = "lloyd@dumbanddumber.com", // Lloyd Christmas
Password = "1234AceVentura#LOL", // Ace Ventura
IsActive = true,
CorrelationId = Guid.NewGuid()
};
var result = commandHandler.Handle<CreateUserCommand, CreateUserResult>(command);
}
}