Adds LightBDD

This commit is contained in:
Janus Knudsen 2025-02-27 17:24:58 +01:00
parent 099f6467d2
commit 104187fcac
16 changed files with 344 additions and 158 deletions

View file

@ -0,0 +1,21 @@
using LightBDD.Framework;
using LightBDD.Framework.Scenarios;
using LightBDD.MsTest3;
namespace PlanTempus.X.BDD.Scenarios;
[TestClass]
public partial class UserRegistrationSpecs : FeatureFixtures.UserRegistrationSpecs
{
[Scenario]
[TestMethod]
public async Task Successful_user_registration_with_valid_email()
{
await Runner.RunScenarioAsync(
_ => Given_no_user_exists_with_email("test@example.com"),
_ => When_I_submit_registration_with_name_and_email("Test User", "test@example.com"),
_ => Then_a_new_user_should_be_created_with_email_and_confirmation_status("test@example.com", false),
_ => Then_a_confirmation_email_should_be_sent()
);
}
}