-
-
Notifications
You must be signed in to change notification settings - Fork 6
added tunit #427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added tunit #427
Conversation
Added a new example for TUnit (RSCG #239), including TUnit.html, a corresponding entry in the list and YAML, and a downloadable source zip. Updated the documentation to use the correct banner image URL and incremented the RSCG count. Also updated the RSCG.xlsx export.
WalkthroughThis PR adds TUnit as the 239th RSCG example. It includes new test project files, comprehensive documentation pages, updated metadata across the example registry, and incremented the total example count from 238 to 239 throughout the documentation site and configuration files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (6)
v2/Generator/MultiGeneratorV2.cs (1)
121-133: New(assets/banner.)rewrite is consistent and safeThe added replacement
text = text.Replace("(assets/banner.", $"({d.Generator!.Source}/assets/banner.");is consistent with the surrounding logic: it correctly rewrites a relative README asset path to an absolute one rooted at
Generator.Source, and nullability is guarded earlier by thestring.IsNullOrWhiteSpace(source)check, so the!is safe here.If you keep adding more of these special-case rewrites over time, you might eventually want to centralize them into a data‑driven map (e.g., a list of
(from, toTemplate)pairs) to reduce repetition and make future additions easier, but this is purely optional for this PR.v2/rscg_examples_site/docs/indexRSCG.md (1)
10-13: Top-level 239 count and TUnit row look correct; minor markdown nitThe heading/intro correctly reference 239 examples, and the new TUnit row (no. 239) matches the table format and category links.
There is a tiny markdownlint issue: the link text has a trailing space (
[TUnit by Tom Longhurst ]). If you want to satisfy MD039, you can drop the internal space:-|239| [TUnit by Tom Longhurst ](/docs/TUnit)|2025-11-08 => 08 November 2025 | [Tests](/docs/Categories/Tests) | +|239| [TUnit by Tom Longhurst](/docs/TUnit)|2025-11-08 => 08 November 2025 | [Tests](/docs/Categories/Tests) |Also applies to: 23-23
v2/.tours/TUnit.tour (1)
5-44: Double‑checkpatternfor the FirstTest.cs stepThe
patternvalue"this is the code"in the FirstTest.cs step may not actually occur in that file, which can prevent CodeTour from positioning on the intended code. Consider using something stable from the file (e.g., the test method name or[Test]attribute) so the step reliably focuses the right area.v2/book/examples/TUnit.html (1)
23-52: Addalttext for images to improve accessibilityAll the screenshots (
TestDemo.csproj.png,FirstTest.cs.png, and the generated *.g.cs images) use<img>withoutalt. Adding short descriptivealttext for each will help screen‑reader users without changing layout.v2/rscg_examples_site/docs/RSCG-Examples/TUnit.md (2)
255-273: Fix escaped braces in C# code blocks so examples are validWithin fenced
```csharpblocks, several braces are escaped as\{, which will render literally and make the sample code invalid C#. Since fenced code is treated as plain text in MDX, you don’t need those escapes. Removing the backslashes will improve copy‑paste‑ability of the examples.Here’s a focused diff for the affected snippets:
- public WindowsOnlyAttribute() : base("Windows only test") \{ } + public WindowsOnlyAttribute() : base("Windows only test") { } @@ - public RetryOnHttpErrorAttribute(int times) : base(times) \{ } + public RetryOnHttpErrorAttribute(int times) : base(times) { } @@ - => Task.FromResult(exception is HttpRequestException \{ StatusCode: HttpStatusCode.ServiceUnavailable }); + => Task.FromResult(exception is HttpRequestException { StatusCode: HttpStatusCode.ServiceUnavailable }); @@ -public async Task Modern_TUnit_Test(string value) \{ } +public async Task Modern_TUnit_Test(string value) { } @@ - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestDemo", static () => new global::TUnit.Core.AssemblyMetadata \{ Name = "TestDemo" }), + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestDemo", static () => new global::TUnit.Core.AssemblyMetadata { Name = "TestDemo" }),Also applies to: 390-398, 743-744
34-41: Optional: address markdownlint warnings (bare URLs, code‑fence languages, tabs, alt text)If you run markdownlint on this MDX file, it flags a few stylistic issues that are easy to tidy up:
- Lines 34–41, 37, 39, 808: wrap bare URLs in Markdown links (e.g.,
[https://github.com/...](https://github.com/...)) to satisfy MD034 and improve consistency.- Line 52: the image in “Original Readme” has empty alt text – consider
to fix MD045 and aid accessibility.- Benchmark sections around the various
BenchmarkDotNetblocks (e.g., near lines 424, 445, 467, 489, 511, 533): add an explicit language like ```text so those fences aren’t treated as heading/content by the linter (MD040/MD058).- Lines 589–592: replace hard tabs in the
<PropertyGroup>block with spaces to align with the rest of the file and avoid MD010.These are non‑functional, but cleaning them up will keep docs and linting output tidy.
Also applies to: 52-53, 424-485, 511-529, 533-551, 589-592, 808-808
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
v2/Generator/all.csvis excluded by!**/*.csvv2/rscg_examples_site/static/exports/RSCG.xlsxis excluded by!**/*.xlsxv2/rscg_examples_site/static/sources/TUnit.zipis excluded by!**/*.zip
📒 Files selected for processing (22)
README.md(2 hunks)later.md(1 hunks)v2/.tours/TUnit.tour(1 hunks)v2/Generator/MultiGeneratorV2.cs(1 hunks)v2/RSCGExamplesData/GeneratorDataRec.json(1 hunks)v2/book/examples/TUnit.html(1 hunks)v2/book/list.html(2 hunks)v2/book/pandocHTML.yaml(1 hunks)v2/rscg_examples/TUnit/description.json(1 hunks)v2/rscg_examples/TUnit/readme.txt(1 hunks)v2/rscg_examples/TUnit/src/TestDemo.slnx(1 hunks)v2/rscg_examples/TUnit/src/TestDemo/FirstTest.cs(1 hunks)v2/rscg_examples/TUnit/src/TestDemo/TestDemo.csproj(1 hunks)v2/rscg_examples/TUnit/video.json(1 hunks)v2/rscg_examples_site/docs/Categories/Tests.md(2 hunks)v2/rscg_examples_site/docs/Categories/_PrimitiveTests.mdx(1 hunks)v2/rscg_examples_site/docs/RSCG-Examples/TUnit.md(1 hunks)v2/rscg_examples_site/docs/RSCG-Examples/index.md(4 hunks)v2/rscg_examples_site/docs/about.md(1 hunks)v2/rscg_examples_site/docs/indexRSCG.md(2 hunks)v2/rscg_examples_site/src/components/HomepageFeatures/index.js(1 hunks)v2/rscg_examples_site/static/exports/RSCG.json(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
v2/Generator/MultiGeneratorV2.cs (1)
v2/Generator/Generator.cs (1)
Generator(4-145)
🪛 Biome (2.1.2)
v2/rscg_examples/TUnit/video.json
[error] 35-36: Property key must be double quoted
(parse)
[error] 36-36: unexpected character =
(parse)
[error] 36-36: expected , but instead found " "
Remove " "
(parse)
[error] 36-36: expected : but instead found }
Remove }
(parse)
[error] 37-38: Expected an array, an object, or a literal but instead found ']'.
Expected an array, an object, or a literal here.
(parse)
🪛 LanguageTool
v2/rscg_examples_site/docs/Categories/_PrimitiveTests.mdx
[style] ~13-~13: Using many exclamation marks might seem excessive (in this case: 12 exclamation marks for a text that’s 1480 characters long)
Context: ...) 2023-04-16 6 TUnit 
v2/rscg_examples_site/docs/RSCG-Examples/index.md
[grammar] ~1449-~1449: Ensure spelling is correct
Context: ... MockMe TUnit
Exp...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
v2/rscg_examples_site/docs/indexRSCG.md
23-23: Spaces inside link text
(MD039, no-space-in-links)
v2/rscg_examples_site/docs/RSCG-Examples/TUnit.md
34-34: Bare URL used
(MD034, no-bare-urls)
37-37: Bare URL used
(MD034, no-bare-urls)
39-39: Bare URL used
(MD034, no-bare-urls)
52-52: Images should have alternate text (alt text)
(MD045, no-alt-text)
424-424: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
435-435: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
445-445: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
456-456: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
467-467: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
478-478: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
489-489: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
500-500: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
511-511: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
522-522: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
533-533: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
544-544: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
589-589: Hard tabs
Column: 1
(MD010, no-hard-tabs)
590-590: Hard tabs
Column: 1
(MD010, no-hard-tabs)
591-591: Hard tabs
Column: 1
(MD010, no-hard-tabs)
592-592: Hard tabs
Column: 1
(MD010, no-hard-tabs)
653-653: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
681-681: No space after hash on atx style heading
(MD018, no-missing-space-atx)
684-684: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
794-794: Spaces inside link text
(MD039, no-space-in-links)
808-808: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Agent
- GitHub Check: CodeQL analysis (csharp)
- GitHub Check: CodeQL analysis (javascript-typescript)
- GitHub Check: call-workflow-passing-data / build (24.3.0)
🔇 Additional comments (15)
later.md (1)
3-3: Latest update date bump is consistentThe new “Latest Update : 2025-11-08 => 08 November 2025” line aligns with the TUnit example’s start date and overall PR timeline. No issues.
v2/book/pandocHTML.yaml (1)
255-255: TUnit HTML page correctly added to Pandoc inputsIncluding
examples/TUnit.htmlininput-fileskeeps the example list in sync with the new generator and ensures it participates in the book build.v2/RSCGExamplesData/GeneratorDataRec.json (1)
1444-1450: TUnit generator entry is consistent and JSON-validThe new
TUnitrecord (Category 13,dtStart2025-11-08,show: true) fits the existing Tests category and chronological ordering, and the added comma afterTeCLIkeeps the JSON structure valid.v2/rscg_examples_site/docs/Categories/_PrimitiveTests.mdx (1)
13-13: TUnit entry added cleanly to Tests categoryThe new TUnit row (item 6) matches the existing formatting, numbering, and date conventions and points to the correct docs/nuget/github locations.
v2/rscg_examples/TUnit/src/TestDemo/TestDemo.csproj (1)
1-17: Project setup for the TUnit demo looks correct
net10.0+OutputTypeExe, implicit usings, nullable, andEmitCompilerGeneratedFilesintoGXall match the typical pattern for these RSCG samples, and the TUnit package reference is wired in cleanly. Just ensure your dev/CI environment has the .NET 10 SDK and thatTUnitversion1.2.11is the intended one to showcase.v2/rscg_examples/TUnit/src/TestDemo.slnx (1)
1-3: Solution file correctly references the demo projectThe
.slnxsolution cleanly includes theTestDemo/TestDemo.csprojvia a relative path; no extra configuration needed for this example.v2/rscg_examples/TUnit/description.json (1)
1-22: TUnit description metadata is well-formed and consistentThe JSON structure (generator/data/links) is valid, points to the correct demo project and source file, and aligns with the conventions used for other generators in this repository.
v2/rscg_examples_site/docs/Categories/Tests.md (1)
3-15: Tests category count and TUnit entry look consistentThe Tests category count is correctly updated to 6 and the new TUnit row matches the existing formatting and badge/link conventions.
v2/book/list.html (1)
20-21: Header count and new TUnit row are alignedThe header now reflects 239 items, and the appended row 239 for TUnit follows the existing table structure and link pattern.
Also applies to: 981-984
v2/rscg_examples_site/docs/about.md (1)
8-10: Updated total to 239 is consistentThe about text now references 239 RSCG, which matches the rest of the site updates for TUnit.
v2/rscg_examples_site/static/exports/RSCG.json (1)
1908-1916: New TUnit entry in export catalog is well-formedThe TUnit object matches the schema of other items (Name/Link/NuGet/Source/Category/AddedOn) and keeps the JSON structure valid.
v2/rscg_examples_site/docs/RSCG-Examples/index.md (1)
3-4: RSCG count and Tests category wiring for TUnit are coherentTitle/description, Tests example count, the added TUnit link, and the mermaid
Tests--> TUnitedge are all in sync with the new example and mirror the structure used for other categories.Also applies to: 1420-1450, 1961-1961
v2/rscg_examples_site/src/components/HomepageFeatures/index.js (1)
7-7: Homepage total updated to 239 matches the catalogThe feature title now reflects 239 examples while keeping the “15 from MSFT” detail; no structural changes to the component.
v2/rscg_examples/TUnit/readme.txt (1)
1-500: TUnit readme content looks consistent and well‑structuredThis readme cleanly embeds the upstream TUnit documentation (features, examples, benchmarks) without introducing obvious formatting or syntax issues. Nothing blocking here from a docs perspective.
README.md (1)
1-49: README metadata and TUnit catalog entry look consistentThe example count (239), latest‑update date, and the new “239. TUnit” block are all aligned and follow the existing formatting and ordering of the catalog. Links and category classification (
Tests) also look correct.
| public class FirstTest | ||
| { | ||
| [Test] | ||
| public async Task Add_WithTwoNumbers_ReturnsSum() | ||
| { | ||
| var result = true; | ||
| // Assert | ||
| await Assert.That(result).IsTrue(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find the test file and verify its existence and content
fd -t f "FirstTest.cs" -x cat -n {}Repository: ignatandrei/RSCG_Examples
Length of output: 375
🏁 Script executed:
#!/bin/bash
# Search for TUnit test patterns in the repository to validate assertion methods
fd -t f "*.cs" -path "*/TUnit/*" | head -20Repository: ignatandrei/RSCG_Examples
Length of output: 237
🏁 Script executed:
#!/bin/bash
# Find C# test files in TUnit directory
find . -path "*/TUnit/*" -name "*.cs" -type f | head -20Repository: ignatandrei/RSCG_Examples
Length of output: 119
🏁 Script executed:
#!/bin/bash
# Search for IsEqualTo usage and TUnit Assert patterns in the repository
rg "IsEqualTo" -t cs --max-count 20Repository: ignatandrei/RSCG_Examples
Length of output: 51
🏁 Script executed:
#!/bin/bash
# Search for Assert patterns in the repository
rg "Assert\." -t cs --max-count 20Repository: ignatandrei/RSCG_Examples
Length of output: 1294
🏁 Script executed:
#!/bin/bash
# Look for TUnit project files, documentation, or references
find . -path "*/TUnit/*" \( -name "*.csproj" -o -name "*.md" -o -name "*.txt" -o -name "*.json" \)Repository: ignatandrei/RSCG_Examples
Length of output: 236
🏁 Script executed:
#!/bin/bash
# Check the TUnit project file for package references
cat -n ./v2/rscg_examples/TUnit/src/TestDemo/TestDemo.csprojRepository: ignatandrei/RSCG_Examples
Length of output: 726
🌐 Web query:
TUnit 1.2.11 assertion methods IsEqualTo documentation
💡 Result:
IsEqualTo — brief summary (TUnit 1.2.11)
- Purpose: assert that an actual value equals an expected value using TUnit's fluent, awaitable assertions. [1]
- Usage (async): await Assert.That(actual).IsEqualTo(expected);. Assertions must be awaited. [1][2]
- Numeric/floating options: supports a tolerance parameter for approximate comparisons (e.g., IsEqualTo(Math.PI, tolerance: 0.001)). [1]
- Common patterns:
- Basic equality: await Assert.That(result).IsEqualTo(5). [1][2]
- With tolerance for floats/doubles: await Assert.That(3.14).IsEqualTo(3.14159, tolerance: 0.01). [1]
- Date/time comparisons can be combined with timing helpers (e.g., .Within) for range tolerance. [2]
- Related: use Assert.Multiple() to group assertions; see equality & comparison section for other comparison assertions (IsNotEqualTo, IsGreaterThan, etc.). [3][1]
Primary docs:
[1] TUnit — Getting Started with Assertions (IsEqualTo examples).
[2] TUnit — Writing your first test (IsEqualTo usage).
[3] TUnit — Assertion Scopes / Multiple assertions.
If you want, I can fetch the exact API signature/overloads from the 1.2.11 package (source or assembly) and paste them here.
Align test body with its name to better showcase TUnit
The test named Add_WithTwoNumbers_ReturnsSum currently only asserts that true is true, which doesn't match the method name and misses an opportunity to demonstrate numeric assertions in TUnit.
Consider updating it to perform an actual addition with a numeric assertion:
- [Test]
- public async Task Add_WithTwoNumbers_ReturnsSum()
- {
- var result = true;
- // Assert
- await Assert.That(result).IsTrue();
- }
+ [Test]
+ public async Task Add_WithTwoNumbers_ReturnsSum()
+ {
+ var result = 2 + 3;
+ await Assert.That(result).IsEqualTo(5);
+ }This keeps the TUnit async assertion style while making the sample self-descriptive and demonstrating numeric comparison, which is more instructive for example code.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public class FirstTest | |
| { | |
| [Test] | |
| public async Task Add_WithTwoNumbers_ReturnsSum() | |
| { | |
| var result = true; | |
| // Assert | |
| await Assert.That(result).IsTrue(); | |
| } | |
| public class FirstTest | |
| { | |
| [Test] | |
| public async Task Add_WithTwoNumbers_ReturnsSum() | |
| { | |
| var result = 2 + 3; | |
| await Assert.That(result).IsEqualTo(5); | |
| } | |
| } |
🤖 Prompt for AI Agents
In v2/rscg_examples/TUnit/src/TestDemo/FirstTest.cs around lines 4 to 12, the
test method Add_WithTwoNumbers_ReturnsSum currently only asserts true and
doesn't perform any numeric operation; replace the placeholder with a simple
addition (e.g., compute a + b), then use the TUnit async assertion pattern to
verify the computed sum equals the expected value (use Await
Assert.That(...).IsEqualTo(expected) or the equivalent async numeric assertion
provided by TUnit), keeping the method async and ensuring variable names and the
assertion match the test name.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-", | ||
| SpeakTest=" "}, | ||
| {"typeStep":"waitseconds","arg":"30"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid JSON due to SpeakTest fragment
The SpeakTest=" " fragment makes this file invalid JSON, so any JSON parser will fail on this script.
You can fix it by removing the stray SpeakTest part so the step matches the surrounding ones:
-{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-",
-SpeakTest=" "},
-{"typeStep":"waitseconds","arg":"30"},
+{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-"},
+{"typeStep":"waitseconds","arg":"30"},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-", | |
| SpeakTest=" "}, | |
| {"typeStep":"waitseconds","arg":"30"}, | |
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-"}, | |
| {"typeStep":"waitseconds","arg":"30"}, |
🧰 Tools
🪛 Biome (2.1.2)
[error] 35-36: Property key must be double quoted
(parse)
[error] 36-36: unexpected character =
(parse)
[error] 36-36: expected , but instead found " "
Remove " "
(parse)
[error] 36-36: expected : but instead found }
Remove }
(parse)
🤖 Prompt for AI Agents
In v2/rscg_examples/TUnit/video.json around lines 35 to 37, the JSON is invalid
because of the stray SpeakTest=" " fragment inside the object; remove the
SpeakTest fragment so the object becomes a normal step (i.e., only include the
typeStep and arg fields like the surrounding entries), ensuring the file is
valid JSON and commas/array structure remain correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds TUnit as the 239th Roslyn Source Code Generator example to the repository. TUnit is a modern testing framework for .NET that uses source-generated tests, parallel execution by default, and Native AOT support.
Key Changes
- Adds comprehensive documentation for TUnit including usage examples, benchmarks, and migration guides
- Updates all count references from 238 to 239 RSCG examples across documentation files
- Includes new example project with test code and generated source files
Reviewed changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| v2/rscg_examples_site/static/sources/TUnit.zip | Binary archive containing TUnit example source code |
| v2/rscg_examples_site/static/exports/RSCG.xlsx | Updated Excel export with TUnit entry (binary) |
| v2/rscg_examples_site/static/exports/RSCG.json | Added TUnit metadata entry to JSON export |
| v2/rscg_examples_site/src/components/HomepageFeatures/index.js | Updated example count from 238 to 239 |
| v2/rscg_examples_site/docs/indexRSCG.md | Added TUnit to chronological list and updated counts |
| v2/rscg_examples_site/docs/about.md | Updated RSCG count from 238 to 239 |
| v2/rscg_examples_site/docs/RSCG-Examples/index.md | Added TUnit to Tests category and updated counts |
| v2/rscg_examples_site/docs/RSCG-Examples/TUnit.md | New comprehensive documentation page for TUnit |
| v2/rscg_examples_site/docs/Categories/_PrimitiveTests.mdx | Added TUnit to Tests category listing |
| v2/rscg_examples_site/docs/Categories/Tests.md | Added TUnit entry and updated count |
| v2/rscg_examples/TUnit/video.json | Video script configuration for TUnit demo |
| v2/rscg_examples/TUnit/src/TestDemo/TestDemo.csproj | Example project file with TUnit package reference |
| v2/rscg_examples/TUnit/src/TestDemo/FirstTest.cs | Example test class demonstrating TUnit usage |
| v2/rscg_examples/TUnit/src/TestDemo.slnx | Solution file for TUnit example |
| v2/rscg_examples/TUnit/readme.txt | README content extracted from TUnit repository |
| v2/rscg_examples/TUnit/description.json | TUnit metadata configuration |
| v2/book/pandocHTML.yaml | Added TUnit to book generation input files |
| v2/book/list.html | Added TUnit to HTML list of examples |
| v2/book/examples/TUnit.html | Generated HTML page for TUnit example |
| v2/RSCGExamplesData/GeneratorDataRec.json | Added TUnit generator record |
| v2/Generator/all.csv | Added TUnit entry to CSV list |
| v2/Generator/MultiGeneratorV2.cs | Added assets/banner path replacement support |
| v2/.tours/TUnit.tour | VS Code tour configuration for TUnit example |
| later.md | Updated latest update date to 2025-11-08 |
| README.md | Added TUnit entry and updated counts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [Arguments("value2")] | ||
| [Retry(3)] | ||
| [ParallelLimit<CustomLimit>] | ||
| public async Task Modern_TUnit_Test(string value) \{ } |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect escaped braces in the markdown documentation. The backslashes before the braces should be removed. The line should be:
public async Task Modern_TUnit_Test(string value) { }| public async Task Modern_TUnit_Test(string value) \{ } | |
| public async Task Modern_TUnit_Test(string value) { } |
| ,{ | ||
| "file": "rscg_examples/TUnit/src/TestDemo/FirstTest.cs", | ||
| "description": "File FirstTest.cs ", | ||
| "pattern": "this is the code" |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern "this is the code" doesn't match any text in the FirstTest.cs file. Based on the file content, this pattern should be removed or changed to match actual code content (e.g., "namespace TestDemo" or "FirstTest").
| "pattern": "this is the code" | |
| "pattern": "namespace TestDemo" |
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-", | ||
| SpeakTest=" "}, |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing quote for the arg parameter. The line should be:
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-"},The SpeakTest property should be on a separate line if needed, or removed entirely.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-", | |
| SpeakTest=" "}, | |
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-"}, |
| {"typeStep":"text","arg": "Remember, you can download the code from here"}, | ||
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TUnit#download-example-net--c-", | ||
| SpeakTest=" "}, | ||
| {"typeStep":"waitseconds","arg":"30"}, |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing comma after the last array element is invalid JSON. Remove the comma after line 37.
| {"typeStep":"waitseconds","arg":"30"}, | |
| {"typeStep":"waitseconds","arg":"30"} |
| // Custom conditional execution | ||
| public class WindowsOnlyAttribute : SkipAttribute | ||
| { | ||
| public WindowsOnlyAttribute() : base("Windows only test") \{ } |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect escaped braces in the markdown documentation. The backslashes before the braces (\{ }) should be removed. In markdown, braces don't need to be escaped. The line should be:
public WindowsOnlyAttribute() : base("Windows only test") { }| // Custom retry logic | ||
| public class RetryOnHttpErrorAttribute : RetryAttribute | ||
| { | ||
| public RetryOnHttpErrorAttribute(int times) : base(times) \{ } |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect escaped braces in the markdown documentation. The backslashes before the braces should be removed. The line should be:
public RetryOnHttpErrorAttribute(int times) : base(times) { }|
|
||
| public override Task<bool> ShouldRetry(TestInformation testInformation, | ||
| Exception exception, int currentRetryCount) | ||
| => Task.FromResult(exception is HttpRequestException \{ StatusCode: HttpStatusCode.ServiceUnavailable }); |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect escaped braces in the markdown documentation. The backslashes before the braces should be removed. The line should be:
=> Task.FromResult(exception is HttpRequestException { StatusCode: HttpStatusCode.ServiceUnavailable });
Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.