From 5965ed899871724b910956ccaed8a7d1bea4d9e7 Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Wed, 2 Sep 2026 22:30:03 +0100 Subject: [PATCH] Fix Concept section: use IsFullyPaid() example, not custom matcher The Concept demo should show a different pattern (encapsulate behavior) than the exercise (custom matcher) so the exercise stays fresh. --- exercises/show-dont-tell/learning-hour.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/exercises/show-dont-tell/learning-hour.md b/exercises/show-dont-tell/learning-hour.md index 75a3d57..1b9448b 100644 --- a/exercises/show-dont-tell/learning-hour.md +++ b/exercises/show-dont-tell/learning-hour.md @@ -44,10 +44,10 @@ The agent might: ### The "Show" Approach (works better) -Refactor one test yourself: +Refactor one test yourself — encapsulate the attribute check behind a behavior method: ```csharp -// Before — telling attributes +// Before — checking an attribute [Test] public void CompletedOrder_TotalIsCorrect() { @@ -56,7 +56,6 @@ public void CompletedOrder_TotalIsCorrect() order.Complete(); Assert.That(order.Total, Is.EqualTo(100m)); - Assert.That(order.Status, Is.EqualTo("completed")); } // After — encapsulating behavior @@ -67,13 +66,13 @@ public void CompletedOrder_TotalIsCorrect() order.AddLine(100m, 1); order.Complete(); - Assert.That(order, Has.OrderTotalCorrect(100m)); + Assert.That(order.IsFullyPaid(100m), Is.True); } ``` Then ask the agent: -> The first test was refactored to use `Has.OrderTotalCorrect()`. Apply the same pattern to the remaining tests. +> The first test was refactored to use `order.IsFullyPaid(expected)` instead of asserting on `order.Total`. Apply the same pattern to the remaining tests. The agent sees the concrete pattern and replicates it. No description needed.