βThe tests append output.NewLine instead of hard-coding "\n" because StringWriter defaults to "\r\n" on Windows and "\n" on Linux and macOS, and the caller can change it.[Footnote 21] The supplemental tests set each value explicitly to check that the reporter follows the writer's setting.
Expect<TException> checks the exact exception type here. A test expecting ArgumentException does not accept ArgumentNullException. The supplemental tests deliberately pass a derived exception to the document's test helper to check this distinction. The JSON tests inspect field values after parsing and the default encoder's escapes, without turning the entire runtime-dependent block list into a separate wire contract.
Combining only the C# blocks in Appendices A through C runs the 38 checks in Program.Main(). Use node WIKI/assets/strategy-pattern/verify.mjs --document-only to reproduce that path in the source repository. Running the example verifier with node WIKI/assets/strategy-pattern/verify.mjs from the repository root also checks Appendix E, supplemental cases, C# 9 compatibility, the standalone minimal examples, and TypeScript. The text blocks are call-flow diagrams rather than executable code; the verifier also checks code fences, languages, and footnote anchors. The verification record distinguishes the scope and results of each execution mode.
You need a .NET SDK and runtime capable of building and running .NET 8, Node.js, and the TypeScript CLI. The supplemental C# tests use a primary constructor, so their default verification stays on C# 12; a separate project checks the extended example's C# 9 syntax compatibility. The script defaults to %APPDATA%/npm/node_modules/typescript/bin/tsc rather than searching every global npm installation location. If you changed the npm prefix or use another operating system, pass your TypeScript package's bin/tsc path after the script. The TypeScript checks cover sorting, preservation of the input array, rejection of invalid prices and IDs, and the distinction between lib declarations and runtime API implementations.
Appendix D. State, lifetime, and output boundaries