Adds LightBDD
This commit is contained in:
parent
099f6467d2
commit
104187fcac
16 changed files with 344 additions and 158 deletions
73
PlanTempus.X.BDD/FeatureFixtures/UserRegistrationSpecs.cs
Normal file
73
PlanTempus.X.BDD/FeatureFixtures/UserRegistrationSpecs.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using LightBDD.Framework;
|
||||
using LightBDD.Framework.Scenarios;
|
||||
using LightBDD.MsTest3;
|
||||
using Shouldly;
|
||||
|
||||
namespace PlanTempus.X.BDD.FeatureFixtures;
|
||||
[TestClass]
|
||||
public partial class UserRegistrationSpecs : FeatureFixture
|
||||
{
|
||||
//private CalculatorContext _context;
|
||||
|
||||
public UserRegistrationSpecs()
|
||||
{
|
||||
//_context = new CalculatorContext();
|
||||
}
|
||||
//[Scenario]
|
||||
//[TestMethod]
|
||||
//public void Successful_user_registration_with_valid_email()
|
||||
//{
|
||||
// // Runner.RunScenario(
|
||||
// // _ => Given_no_user_exists_with_email("test@example.com")
|
||||
|
||||
// //);
|
||||
// //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()
|
||||
// //);
|
||||
//}
|
||||
protected async Task Given_no_user_exists_with_email(string email)
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
|
||||
});
|
||||
//Assert.IsFalse(await _context.UserExistsAsync(email), $"User with email {email} should not exist");
|
||||
true.ShouldBe(true);
|
||||
}
|
||||
|
||||
protected async Task When_I_submit_registration_with_name_and_email(string name, string email)
|
||||
{
|
||||
//await _context.RegisterUserAsync(name, email);
|
||||
await Task.Run(() =>
|
||||
{
|
||||
|
||||
});
|
||||
true.ShouldBe(true);
|
||||
}
|
||||
|
||||
protected async Task Then_a_new_user_should_be_created_with_email_and_confirmation_status(string email, bool emailConfirmed)
|
||||
{
|
||||
//var user = await _context.GetUserByEmailAsync(email);
|
||||
//Assert.IsNotNull(user);
|
||||
//Assert.AreEqual(email, user.Email);
|
||||
//Assert.AreEqual(emailConfirmed, user.EmailConfirmed);
|
||||
await Task.Run(() =>
|
||||
{
|
||||
|
||||
});
|
||||
true.ShouldBe(true);
|
||||
}
|
||||
|
||||
protected async Task Then_a_confirmation_email_should_be_sent()
|
||||
{
|
||||
//Assert.IsTrue(await _context.WasConfirmationEmailSentAsync(), "Confirmation email should be sent");
|
||||
await Task.Run(() =>
|
||||
{
|
||||
|
||||
});
|
||||
true.ShouldBe(true);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue