33 lines
848 B
C#
33 lines
848 B
C#
|
|
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);
|
||
|
|
}
|
||
|
|
}
|