diff --git a/ideas/split-loop-with-lambda/exercise3/.gitignore b/ideas/split-loop-with-lambda/exercise3/.gitignore new file mode 100644 index 0000000..ac8d21b --- /dev/null +++ b/ideas/split-loop-with-lambda/exercise3/.gitignore @@ -0,0 +1,3 @@ +bin/ +obj/ +*.user diff --git a/ideas/split-loop-with-lambda/exercise3/README.md b/ideas/split-loop-with-lambda/exercise3/README.md index 546b5a4..a39bed8 100644 --- a/ideas/split-loop-with-lambda/exercise3/README.md +++ b/ideas/split-loop-with-lambda/exercise3/README.md @@ -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). diff --git a/ideas/split-loop-with-lambda/exercise3/csharp/global.json b/ideas/split-loop-with-lambda/exercise3/csharp/global.json index 37704f0..6e016cf 100644 --- a/ideas/split-loop-with-lambda/exercise3/csharp/global.json +++ b/ideas/split-loop-with-lambda/exercise3/csharp/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "7.0.0", - "rollForward": "latestMajor", + "version": "10.0.0", + "rollForward": "latestFeature", "allowPrerelease": true } } diff --git a/ideas/split-loop-with-lambda/exercise3/csharp/src/Buyers.csproj b/ideas/split-loop-with-lambda/exercise3/csharp/src/Buyers.csproj index 8268829..4340f62 100644 --- a/ideas/split-loop-with-lambda/exercise3/csharp/src/Buyers.csproj +++ b/ideas/split-loop-with-lambda/exercise3/csharp/src/Buyers.csproj @@ -1,7 +1,7 @@ - net7.0 + net10.0 diff --git a/ideas/split-loop-with-lambda/exercise3/csharp/test/BuyersTests.csproj b/ideas/split-loop-with-lambda/exercise3/csharp/test/BuyersTests.csproj index 09707bf..f679db0 100644 --- a/ideas/split-loop-with-lambda/exercise3/csharp/test/BuyersTests.csproj +++ b/ideas/split-loop-with-lambda/exercise3/csharp/test/BuyersTests.csproj @@ -1,14 +1,14 @@ - net7.0 + net10.0 false - - - + + + diff --git a/ideas/split-loop-with-lambda/exercise3/solution/global.json b/ideas/split-loop-with-lambda/exercise3/solution/global.json index 37704f0..6e016cf 100644 --- a/ideas/split-loop-with-lambda/exercise3/solution/global.json +++ b/ideas/split-loop-with-lambda/exercise3/solution/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "7.0.0", - "rollForward": "latestMajor", + "version": "10.0.0", + "rollForward": "latestFeature", "allowPrerelease": true } } diff --git a/ideas/split-loop-with-lambda/exercise3/solution/src/Buyers.csproj b/ideas/split-loop-with-lambda/exercise3/solution/src/Buyers.csproj index 8268829..4340f62 100644 --- a/ideas/split-loop-with-lambda/exercise3/solution/src/Buyers.csproj +++ b/ideas/split-loop-with-lambda/exercise3/solution/src/Buyers.csproj @@ -1,7 +1,7 @@ - net7.0 + net10.0 diff --git a/ideas/split-loop-with-lambda/exercise3/solution/test/BuyersTests.csproj b/ideas/split-loop-with-lambda/exercise3/solution/test/BuyersTests.csproj index 09707bf..f679db0 100644 --- a/ideas/split-loop-with-lambda/exercise3/solution/test/BuyersTests.csproj +++ b/ideas/split-loop-with-lambda/exercise3/solution/test/BuyersTests.csproj @@ -1,14 +1,14 @@ - net7.0 + net10.0 false - - - + + +