Files
show-dont-tell/csharp
mostalive 4e0aea732a Add payment state to Order with guarded Pay transition
- Order records payments: Payments, AmountPaid, Outstanding,
  IsFullyPaid (parameterless, replaces IsFullyPaid(expectedTotal))
- Pay rejects open orders, non-positive amounts, and overpayments
- 4 new OrderCompletion tests assert observable state:
  PaymentOnOpenOrder_Throws_OrderStillUnpaid,
  CompletedOrder_PartialPayment_IsNotFullyPaid,
  CompletedOrder_PaymentsSummingToTotal_IsFullyPaid,
  Overpayment_Throws_AmountPaidUnchanged
- 11 tests green (6 OrderTotal + 5 OrderCompletion)
2026-10-01 13:46:10 +01:00
..

Show, Don't Tell — C# exercise workspace

Workspace for the "Show, Don't Tell — Using Examples with Coding Agents" exercise (C# / .NET 10 / NUnit).

Prerequisites

  • .NET 10 SDK (version pinned in global.json)
  • If you use mise: mise install installs the SDK listed in mise.toml

Build and run the tests

dotnet build
dotnet test

Layout

Directory Contents
src/OrderDomain, tests/OrderTests Order domain with discount behaviour, and its tests
src/OrderBookDomain, tests/OrderBookTests OrderBook state machine, and its integration tests

Open ShowDontTell.sln in your IDE (Rider, Visual Studio, VS Code with the C# extension).