Create order (xUnit)
Generated output
Section titled “Generated output”### ✅ Create orderTags: `db`, `smoke`
- **Given** the database is seeded- **And** the API is running- **When** the client creates an order- **Then** the response status should be 201- **And** the order should exist in the databaseC# code
Section titled “C# code”using ExecutableStories.Xunit;using Xunit;
public class OrdersTests : IDisposable{ [Fact] public void CreateOrder() { Story.Init("Create order", "db", "smoke"); Story.Given("the database is seeded"); Story.Given("the API is running"); Story.When("the client creates an order"); Story.Then("the response status should be 201"); Story.Then("the order should exist in the database"); }
public void Dispose() => Story.RecordAndClear();}