Bulk user creation (xUnit)
Generated output
Section titled “Generated output”### ✅ Bulk user creation
- **Given** the following users exist **Users** | email | role | status | | ----------------- | ----- | ------ | | [email protected] | admin | active | | [email protected] | user | active | | [email protected] | user | locked |- **When** the admin opens the user list- **Then** the user list should include **Expected** | email | role | status | | ----------------- | ----- | ------ | | [email protected] | admin | active | | [email protected] | user | active | | [email protected] | user | locked |C# code
Section titled “C# code”using ExecutableStories.Xunit;using Xunit;
public class UsersTests : IDisposable{ [Fact] public void BulkUserCreation() { Story.Init("Bulk user creation"); Story.Given("the following users exist"); Story.Table("Users", new[] { "email", "role", "status" }, new[] { } ); Story.When("the admin opens the user list"); Story.Then("the user list should include"); Story.Table("Expected", new[] { "email", "role", "status" }, new[] { } ); }
public void Dispose() => Story.RecordAndClear();}