Add round 2: split multi-step OrderBook tests (example created by participant)

- Add OrderBookDomain: in-memory order book with Pending →
  WaitingForPayment → Fulfilling → Delivered state machine, payment
  window based on passed-in timestamps, cancellation rules
- Add OrderBookTests: 7 integration tests in given/when/then/when/then
  anti-pattern style as starting material for the exercise
- Learning hour: add round 2 where participants create the example
  themselves before showing it to the agent (no refactored test given)
- Fix sln: OrderTests Debug config was mapped to Release
This commit is contained in:
Your Name
2026-09-03 13:50:38 +00:00
parent 3b7e880717
commit e8748ee697
7 changed files with 292 additions and 5 deletions
@@ -0,0 +1,25 @@
namespace OrderBookDomain;
public enum OrderStatus
{
Pending,
WaitingForPayment,
Fulfilling,
Delivered,
Cancelled
}
public class Order
{
public int Id { get; }
public string Customer { get; }
public OrderStatus Status { get; internal set; }
public DateTimeOffset? FinalizedAt { get; internal set; }
internal Order(int id, string customer)
{
Id = id;
Customer = customer;
Status = OrderStatus.Pending;
}
}