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
31 lines
1 KiB
C#
31 lines
1 KiB
C#
using LightBDD.Framework;
|
|
using LightBDD.Framework.Scenarios;
|
|
using LightBDD.MsTest3;
|
|
namespace PlanTempus.X.BDD.Scenarios;
|
|
|
|
[TestClass]
|
|
public partial class AccountRegistrationSpecs : FeatureFixtures.AccountRegistrationSpecs
|
|
{
|
|
[Scenario]
|
|
[TestMethod]
|
|
public async Task Successful_account_registration_with_valid_email()
|
|
{
|
|
await Runner.RunScenarioAsync(
|
|
_ => Given_no_account_exists_with_email("test@example.com"),
|
|
_ => When_I_submit_registration_with_email_and_password("test@example.com", "TestPassword123!"),
|
|
_ => Then_a_new_account_should_be_created_with_email_and_confirmation_status("test@example.com", false),
|
|
_ => Then_a_confirmation_email_should_be_sent()
|
|
);
|
|
}
|
|
|
|
[Scenario]
|
|
[TestMethod]
|
|
public async Task Reject_duplicate_email_registration()
|
|
{
|
|
await Runner.RunScenarioAsync(
|
|
_ => Given_an_account_already_exists_with_email("existing@example.com"),
|
|
_ => When_I_submit_registration_with_email("existing@example.com"),
|
|
_ => Then_registration_should_fail_with_error("Email already exists")
|
|
);
|
|
}
|
|
}
|