Renames core domain entities and services from "User" to "Account" Refactors project-wide namespaces, classes, and database tables to use "Account" terminology Updates related components, services, and database schema to reflect new domain naming Standardizes naming conventions across authentication and organization setup features
37 lines
No EOL
1 KiB
C#
37 lines
No EOL
1 KiB
C#
using Autofac;
|
|
using Insight.Database;
|
|
using PlanTempus.Components;
|
|
using PlanTempus.Components.Accounts.Create;
|
|
using PlanTempus.Core.CommandQueries;
|
|
using PlanTempus.Core.Database;
|
|
using PlanTempus.Core.Database.ConnectionFactory;
|
|
using Shouldly;
|
|
namespace PlanTempus.X.TDD.CommandQueryHandlerTests;
|
|
|
|
[TestClass]
|
|
public class HandlerTest : TestFixture
|
|
{
|
|
[TestInitialize]
|
|
public void This()
|
|
{
|
|
}
|
|
|
|
[TestMethod]
|
|
public async Task ShouldResolveCommandHandlerAndDispatchToGenericCommandHandler()
|
|
{
|
|
var commandHandler = Container.Resolve<ICommandHandler>();
|
|
commandHandler.ShouldBeOfType<CommandHandler>();
|
|
|
|
var command = new CreateAccountCommand
|
|
{
|
|
Email = $"{GetRandomWord()}@dumbanddumber.com5", // Lloyd Christmas
|
|
Password = "1234AceVentura#LOL", // Ace Ventura
|
|
IsActive = true,
|
|
CorrelationId = Guid.NewGuid()
|
|
};
|
|
|
|
var result = await commandHandler.Handle(command);
|
|
|
|
result.ShouldNotBeNull();
|
|
}
|
|
} |