Files
learning-hour-maker/exercises/show-dont-tell/src/OrderBookDomain/Order.cs
T
Your Name e8748ee697 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
2026-09-03 13:50:38 +00:00

26 lines
480 B
C#

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;
}
}