Retarget exercise 3 to net10.0 and verify with dotnet test

Verified with SDK 10.0.4xx (mise): builds clean, solution test green
deterministically, pristine test flaky as designed (failed 2/3 runs).
net7.0 runtime is out of support and unavailable, so the exercise now
targets net10.0; MSTest bumped 2.1.1 -> 3.6.4 to silence the NU1903
transitive-dependency warning. .gitignore for bin/obj.
This commit is contained in:
Your Name
2026-09-28 21:53:01 +00:00
parent 1189041d8e
commit 679e95eb83
8 changed files with 24 additions and 19 deletions
@@ -5,7 +5,8 @@ A third, minimal example in the same kata theme: the sellers exist
`Buyers` computes a buyer's shopping-list total, and `PriceList` stands for an
external pricing service (it adds random surge pricing, so the test is flaky).
Written in **C#** (MSTest, .NET 7 — same setup as the kata's `csharp/` folder).
Written in **C#** (MSTest, .NET 10; verified with `dotnet test` on SDK
10.0.4xx — pristine test is flaky by design, solution is deterministic).
Run with `dotnet test test/BuyersTests.csproj`.
Contents:
@@ -33,8 +34,9 @@ Next-time arc: marketing adds surge discounts, `PriceList` grows
`DiscountFor(...)` — two methods to stub → extract a role interface
(`IPricing`) instead of two lambdas. See the demo script's closing note.
## Not verified by a build
## Verified
This exercise was authored without a local .NET SDK (structurally mirrored from
the kata's `csharp/` project files). Run `dotnet test test/BuyersTests.csproj`
once on a machine with the SDK before facilitating.
Built and run with `dotnet test` (SDK 10.0.4xx): solution green deterministically,
pristine test flaky (failed 2 of 3 runs, passed 1 — both surges rolled 0).
MSTest bumped to 3.6.4 (kata ships 2.1.1, whose transitive Newtonsoft.Json trips
a NU1903 vulnerability warning).