feat(dotnet): add JUnit XML output, upgrade to .NET 8, and refactor to Calculator classes#101
Merged
Merged
Conversation
…o Calculator classes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Konboi
commented
May 21, 2026
| Assert.Throws<ArgumentException>(() => _calculator.Divide(10, 0)); | ||
| } | ||
|
|
||
| // Intentionally failing test to verify failure reporting in test reports |
Collaborator
Author
There was a problem hiding this comment.
CI failed due to this intentional failed test
Konboi
commented
May 21, 2026
| - name: Setup .NET Core SDK | ||
| uses: actions/setup-dotnet@v3 | ||
| with: | ||
| dotnet-version: 7.0.100 |
Collaborator
Author
There was a problem hiding this comment.
dotnet 7 is already EOL
ono-max
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The dotnet example needed several improvements:
Exampleclass that didn't clearly demonstrate how test reports look across multiple test classes.What
JunitXml.TestLoggerpackage and updateddotnet testcommand to output bothtest-result.xml(NUnit format) andjunit-result.xml(JUnit format).TargetFrameworktonet8.0and SDK version to8.0.xin the CI workflow. Also updated all package versions to be compatible with .NET 8.Exampleclass with a proper Calculator structure:AddCalculator,SubtractCalculator,MultiplyCalculator,DivideCalculator,PowerCalculatorCalculatorfacade class that composes all operation classesTestAddFailingandTestDivideFailingwith a comment indicating they are intentionally failing, to verify that failure reporting works correctly in both XML formats.Please Review Here (Optional)
NunitXml.TestLoggerwas bumped to8.0.0to fix aget_InputSanitizerinterface compatibility error with the newer test platform (17.8.0).