Adds Decorator, wip
This commit is contained in:
parent
a86a2d7ade
commit
49f9b99ee1
9 changed files with 112 additions and 45 deletions
|
|
@ -4,6 +4,7 @@ using PlanTempus.Components;
|
|||
using PlanTempus.Components.Users.Create;
|
||||
using PlanTempus.Core.Database;
|
||||
using PlanTempus.Core.Database.ConnectionFactory;
|
||||
using Shouldly;
|
||||
|
||||
namespace PlanTempus.X.TDD.CommandQueryHandlerTests;
|
||||
|
||||
|
|
@ -16,18 +17,21 @@ public class HandlerTest : TestFixture
|
|||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestDefaultConnection()
|
||||
public async Task ShouldResolveCommandHandlerAndDispatchToGenericCommandHandler()
|
||||
{
|
||||
var commandHandler = Container.Resolve<CommandHandler>();
|
||||
var commandHandler = Container.Resolve<ICommandHandler>();
|
||||
commandHandler.ShouldBeOfType<CommandHandler>();
|
||||
|
||||
var command = new CreateUserCommand
|
||||
{
|
||||
Email = "lloyd@dumbanddumber.com", // Lloyd Christmas
|
||||
Email = "lloyd@dumbanddumber.com1", // Lloyd Christmas
|
||||
Password = "1234AceVentura#LOL", // Ace Ventura
|
||||
IsActive = true,
|
||||
CorrelationId = Guid.NewGuid()
|
||||
};
|
||||
|
||||
var result = commandHandler.Handle<CreateUserCommand, CreateUserResult>(command);
|
||||
var result = await commandHandler.Handle<CreateUserCommand, CreateUserResult>(command);
|
||||
|
||||
result.ShouldNotBeNull();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue