Add learning hour: Show, Don't Tell — using examples with coding agents

Exercise project with Order domain and NUnit tests demonstrating
the 'show, don't tell' pattern for guiding coding agents.

- 1 refactored test using custom matcher (the example)
- 5 unrefactored tests with multiple asserts (the practice)
- OrderStateConstraint custom matcher for NUnit 3
This commit is contained in:
2026-09-02 22:22:12 +01:00
parent d8eaf03a68
commit cfde583649
9 changed files with 385 additions and 0 deletions
@@ -0,0 +1,19 @@
namespace OrderDomain;
public class OrderLine
{
public decimal UnitPrice { get; }
public int Quantity { get; }
public bool HasDiscount { get; private set; }
public decimal Value =>
HasDiscount ? UnitPrice * Quantity * 0.8m : UnitPrice * Quantity;
public OrderLine(decimal unitPrice, int quantity)
{
UnitPrice = unitPrice;
Quantity = quantity;
}
public void ApplyDiscount() => HasDiscount = true;
}