-
-
Notifications
You must be signed in to change notification settings - Fork 0
test: Added XUnit integration tests #19
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAdds a new integration test class that parameterizes global.json generation across SDK versions, prerelease flags, and rollForward strategies, plus 26 corresponding snapshot files covering the combinations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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: 1
🧹 Nitpick comments (2)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_2c082e17919494f9.verified.json (1)
1-6: Snapshot content looks valid for global.json.The JSON structure and values are appropriate for a .NET SDK configuration file. The snapshot correctly captures the expected output with SDK version "8.0.204" and prerelease disabled.
Optional: Verify UTF-8 BOM and trailing newline behavior.
Since this is a snapshot file reflecting actual
GlobalJsonBuilderoutput, you may want to verify:
- Whether the UTF-8 BOM (byte order mark) at the file start is intentional. While valid, it can occasionally cause issues with JSON parsers.
- Whether the missing trailing newline is intentional. Many tools and conventions expect text files to end with a newline.
If these characteristics are unintentional, they should be addressed in the
GlobalJsonBuilderimplementation rather than the snapshot.tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs (1)
18-18: Consider adding separators to directory names for better readability.The concatenated string creates directory names like
CreateAsync_Theory_Expected8.0.204Trueminor, which are hard to parse visually. Adding underscores would improve debugging experience.Apply this diff to improve readability:
- var subdirectory = directory.CreateDirectory($"{nameof(CreateAsync_Theory_Expected)}{runtimeVersion}{allowPrerelease}{rollForward}"); + var subdirectory = directory.CreateDirectory($"{nameof(CreateAsync_Theory_Expected)}_{runtimeVersion}_{allowPrerelease}_{rollForward}");
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (41)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0953d942c368e5c4.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0ca2856ff8447f53.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_222f9326e75bfabc.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_27338f096c513e0c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_27dac8bce9f2bba6.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_27f7ef5c3496bfa8.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_29a70630c349a7d1.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_2c082e17919494f9.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_36e5be25f3377f50.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_3bd744a98c45d07d.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_3cccaa22737ca0ba.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_42d0c2b76075d84a.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_4aac91286ee491e9.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_4cb21f6c5e944c94.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_578eeac0664b024e.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5e88796b4bfcad1c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5edeed2f38d037f2.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_60da8cc8668b63ea.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_67b8267d8efb8d3a.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6a249aead9232dde.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6e38af595c802680.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_837b7179b0dbc23f.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_88ad7958ed5988b5.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8917647f9c788a7c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8c03afa2958a9974.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8d829d263eb16f5b.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_92ce7839b53e6783.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_9bebea6b82fa59e9.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_ab779f732652d43c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_ab96645200d2e885.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_afee9e7fabf41ae4.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_b26fd9e1f79d6874.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c176a5f1415c0581.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c5cf984eed0004c0.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c7fcae8f45466341.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c974ed7e08ea7101.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d5c74c4bf7107c4f.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d670c5ada2ebf4f7.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d841527043f96747.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_f80a812077d8842d.verified.json(1 hunks)
🔇 Additional comments (20)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_afee9e7fabf41ae4.verified.json (1)
1-7: Snapshot is well-formed and valid.The JSON structure correctly represents a .NET global.json configuration with reasonable test data (SDK version 8.0.204, prerelease disabled, rollForward strategy set to "feature"). The snapshot file follows the expected naming convention for verified test snapshots.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c7fcae8f45466341.verified.json (1)
1-7: Snapshot file review limited — test implementation code needed.This snapshot file is one of 41 added as part of the integration test suite. However, I only have access to snapshot output, not the actual test implementation in
GlobalJsonBuilderTests.cs. To provide a comprehensive review of test design, data-driven test coverage, and assertions, I need visibility into the test class code.Could you provide the test class file so I can verify:
- Test method design and use of xUnit
TheoryData- Completeness of the parameter matrix (SDK versions, prerelease flags, rollForward strategies)
- Correctness of snapshot testing assertions
- Whether fixture setup and cleanup are appropriate
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_4cb21f6c5e944c94.verified.json (2)
1-7: Snapshot file is well-formed and valid.The JSON structure is syntactically correct and represents a reasonable SDK configuration variant for testing global.json builder behavior.
1-7: Verify the corresponding test method and snapshot coverage.This snapshot is part of a broader set of 41 snapshot files. To ensure the test suite is comprehensive and correct:
- Confirm that the test method
CreateAsync_Theory_ExpectedinGlobalJsonBuilderTests.csis properly configured to generate and verify these snapshots.- Verify that all 41 snapshot variants represent distinct, meaningful test cases (combinations of .NET SDK versions, prerelease flags, and rollForward strategies as indicated in the PR summary).
- Ensure the Verify.Xunit library is correctly integrated and all snapshots are committed to the repository.
Since I only have access to this single snapshot file and not the test class itself, please ensure these points are validated during review.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_60da8cc8668b63ea.verified.json (1)
1-7: LGTM!The snapshot file contains valid JSON with a correctly structured global.json configuration. The SDK version format, allowPrerelease flag, and rollForward policy are all valid values.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d841527043f96747.verified.json (1)
1-7: LGTM! Valid test snapshot structure.The JSON structure is well-formed and correctly represents a valid global.json configuration for .NET SDK settings. All property values are syntactically valid and appropriate for snapshot testing.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_f80a812077d8842d.verified.json (1)
1-7: Incomplete review scope: actual test file required for comprehensive assessment.The Verify library supports xUnit testing, and snapshot files like this one are expected output artifacts. However, reviewing only snapshot files provides limited insights into test quality, coverage, and correctness.
The snapshot JSON itself is syntactically valid and its structure aligns with the global.json schema, which allows defining .NET SDK versions with rollForward policies. The
allowPrereleaseandrollForward: "latestPatch"values are valid per .NET documentation.Without the test source file (GlobalJsonBuilderTests.cs), I cannot assess:
- The actual test method implementation and logic
- Whether the Theory data generation correctly produces all 41 snapshot combinations
- What assertions are being made during the test
- Overall test coverage and edge case handling
I'll search the codebase for the test file to provide a complete review. Would you like me to generate a verification script to locate GlobalJsonBuilderTests.cs, or can you include the test file in the review?
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0953d942c368e5c4.verified.json (1)
1-7: LGTM!The snapshot file is well-formed and contains valid global.json content. The JSON structure correctly follows Microsoft's global.json schema with appropriate SDK configuration properties (version, allowPrerelease, rollForward).
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c5cf984eed0004c0.verified.json (1)
1-7: Snapshot file is valid, but the test matrix is already comprehensive.The JSON structure is well-formed and represents a valid global.json SDK configuration. The test theory in GlobalJsonBuilderTests.cs systematically generates all combinations through GetTheoryData():
- 2 runtime versions (default + "10.0.100")
- 2 allowPrerelease boolean states
- All 10 RollForward enum values
This produces exactly 40 snapshot files (not 41 as previously noted), covering all intended combinations with no obvious gaps. The snapshots are generated through actual test execution via
VerifyFile(...).UseParameters(...).HashParameters(), ensuring they reflect real behavior rather than manual construction.Likely an incorrect or invalid review comment.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_ab96645200d2e885.verified.json (1)
1-7: LGTM! Valid global.json snapshot.The JSON structure is well-formed and represents a valid .NET SDK configuration for integration test verification. The values are semantically correct:
- Version format follows .NET SDK conventions
allowPrerelease: trueenables prerelease SDK versionsrollForward: "latestMinor"is a valid rollForward policytests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8917647f9c788a7c.verified.json (1)
1-6: No issues require action. The UTF-8 BOM in snapshot files is the standard encoding recommended by the Verify library and is properly applied consistently across all 40 snapshot files. The test implementation correctly uses xUnit's Theory pattern with Verify's parameter-based snapshot hashing, and the captured snapshot content is semantically valid for a global.json configuration.Likely an incorrect or invalid review comment.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6a249aead9232dde.verified.json (1)
1-7: Snapshot file is valid and correctly generated.The snapshot represents one of 40 combinations systematically generated by the test's theory data: SDK version "10.0.100" with allowPrerelease=true and rollForward="latestPatch". The GlobalJsonBuilder generates this output correctly according to its documented behavior, and the JSON structure is valid.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_29a70630c349a7d1.verified.json (1)
1-6: Valid test case for global.json without rollForward property.This snapshot correctly tests the scenario where the
rollForwardproperty is omitted, which is valid for global.json files and allows the SDK to use its default rollForward behavior.tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5e88796b4bfcad1c.verified.json (1)
3-3: The snapshot uses SDK version "10.0.100", which was released as the initial .NET 10.0.0 version on November 11, 2025. SDK 10.0.100 was released with .NET 10.0.0. This is a valid, existing version. Consider updating to SDK version 10.0.101, released December 9, 2025 for the latest patch.Likely an incorrect or invalid review comment.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c974ed7e08ea7101.verified.json (1)
1-7: LGTM! Snapshot structure and values are correct.The JSON structure is valid, SDK version 8.0.204 is a legitimate .NET 8 SDK release, and the rollForward value "latestFeature" is properly specified according to the .NET SDK documentation.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_b26fd9e1f79d6874.verified.json (1)
1-7: Excellent test coverage approach!These snapshot files effectively test various combinations of SDK versions, prerelease settings, and rollForward strategies. The JSON structures are valid and the rollForward values align with .NET SDK specifications. This comprehensive parameterized testing approach will catch regressions across different configuration scenarios.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_837b7179b0dbc23f.verified.json (1)
1-7: Confirm .NET SDK versions in test snapshots are intentional.Snapshot files contain SDK versions "10.0.100" and "8.0.204". Verify these versions align with the project's testing strategy.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs (3)
1-9: LGTM! Clean test class setup.The use of primary constructor syntax with IClassFixture pattern is a modern, idiomatic approach for xUnit test fixture injection.
19-23: Well-structured test implementation.The test correctly uses:
- Async disposal pattern with
await using- Fluent API for builder configuration
- Verify library with parameter hashing for deterministic snapshot names
- TestContext.Current.CancellationToken for proper cancellation support
26-42: No issues found.Constants.RuntimeSdkDefaultis properly defined in theNetEvolve.ProjectBuildersnamespace and correctly accessible from this test file.
..._snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_3cccaa22737ca0ba.verified.json
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
==========================================
- Coverage 70.52% 70.46% -0.07%
==========================================
Files 30 31 +1
Lines 726 738 +12
Branches 88 88
==========================================
+ Hits 512 520 +8
- Misses 202 206 +4
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3a67765 to
a2c4c9a
Compare
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: 0
🧹 Nitpick comments (1)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs (1)
10-24: Consider breaking the fluent chain for readability.The test logic is sound and follows best practices:
- Uses
await usingfor proper disposal- Uses
TestContext.Current.CancellationTokenfor cancellation support- Employs snapshot testing with parameter hashing
However, line 20's fluent API chain exceeds 100 characters and could be split for better readability.
Apply this diff to improve readability:
- await builder.SetAllowPrerelease(allowPrerelease).SetRollForward(rollForward).CreateAsync(cancellationToken: TestContext.Current.CancellationToken); + await builder + .SetAllowPrerelease(allowPrerelease) + .SetRollForward(rollForward) + .CreateAsync(cancellationToken: TestContext.Current.CancellationToken);
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (25)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0953d942c368e5c4.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0ca2856ff8447f53.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_27338f096c513e0c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_29a70630c349a7d1.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_2c082e17919494f9.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_36e5be25f3377f50.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_42d0c2b76075d84a.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_578eeac0664b024e.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5e88796b4bfcad1c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5edeed2f38d037f2.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_60da8cc8668b63ea.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_67b8267d8efb8d3a.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6a249aead9232dde.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6e38af595c802680.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_88ad7958ed5988b5.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8917647f9c788a7c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8d829d263eb16f5b.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_9bebea6b82fa59e9.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_ab96645200d2e885.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_b26fd9e1f79d6874.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c176a5f1415c0581.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c974ed7e08ea7101.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d5c74c4bf7107c4f.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_f80a812077d8842d.verified.json(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_36e5be25f3377f50.verified.json
🚧 Files skipped from review as they are similar to previous changes (20)
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_27338f096c513e0c.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d5c74c4bf7107c4f.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0953d942c368e5c4.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0ca2856ff8447f53.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_29a70630c349a7d1.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_42d0c2b76075d84a.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_578eeac0664b024e.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_60da8cc8668b63ea.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8917647f9c788a7c.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6e38af595c802680.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_67b8267d8efb8d3a.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5edeed2f38d037f2.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6a249aead9232dde.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c176a5f1415c0581.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_ab96645200d2e885.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_9bebea6b82fa59e9.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5e88796b4bfcad1c.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_2c082e17919494f9.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_f80a812077d8842d.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8d829d263eb16f5b.verified.json
🔇 Additional comments (6)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_b26fd9e1f79d6874.verified.json (1)
1-7: LGTM! Valid snapshot file.The JSON structure is correct and represents a valid global.json configuration. The SDK version "8.0.204", allowPrerelease flag, and rollForward policy "latestMajor" are all properly formatted for snapshot testing.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_88ad7958ed5988b5.verified.json (1)
1-7: LGTM!The snapshot file contains a valid global.json structure with appropriate SDK configuration. The format and values align correctly with the test parameters.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c974ed7e08ea7101.verified.json (1)
1-7: LGTM!The snapshot file contains a valid global.json structure. The SDK version "8.0.204" aligns with the expected output from the test theory data.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs (3)
8-9: LGTM!The class declaration properly implements the xUnit fixture pattern with
IClassFixture<TemporaryDirectoryFixture>, ensuring proper test isolation through temporary directories.
26-42: Constants.RuntimeSdkDefault exists and is properly defined.The theory data generation logic is correct and will produce comprehensive test coverage across all parameter combinations. The constant is defined as
public const string RuntimeSdkDefault = "8.0.204"inConstants.csand is used consistently throughout the codebase.
1-6: No issues found. The required types (IClassFixture<T>,[Theory],[MemberData],TheoryData<T>,VerifyFile,TestContext) are correctly available through global using declarations provided automatically by the xunit.v3, NetEvolve.Extensions.XUnit.V3, and Verify packages. This is the standard configuration approach in modern .NET test projects and requires no changes.
a2c4c9a to
a730252
Compare
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: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (25)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0953d942c368e5c4.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0ca2856ff8447f53.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_27338f096c513e0c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_29a70630c349a7d1.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_2c082e17919494f9.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_36e5be25f3377f50.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_42d0c2b76075d84a.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_578eeac0664b024e.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5e88796b4bfcad1c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5edeed2f38d037f2.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_60da8cc8668b63ea.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_67b8267d8efb8d3a.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6a249aead9232dde.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6e38af595c802680.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_88ad7958ed5988b5.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8917647f9c788a7c.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8d829d263eb16f5b.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_9bebea6b82fa59e9.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_ab96645200d2e885.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_b26fd9e1f79d6874.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c176a5f1415c0581.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c974ed7e08ea7101.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d5c74c4bf7107c4f.verified.json(1 hunks)tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_f80a812077d8842d.verified.json(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8917647f9c788a7c.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_36e5be25f3377f50.verified.json
🚧 Files skipped from review as they are similar to previous changes (10)
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_f80a812077d8842d.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_29a70630c349a7d1.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6a249aead9232dde.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_9bebea6b82fa59e9.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5edeed2f38d037f2.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_2c082e17919494f9.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_27338f096c513e0c.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_d5c74c4bf7107c4f.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c176a5f1415c0581.verified.json
- tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_42d0c2b76075d84a.verified.json
⏰ 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). (3)
- GitHub Check: Build & Tests / Run Tests (windows-latest) / Testing .NET solution
- GitHub Check: Build & Tests / Run Tests (macos-latest) / Testing .NET solution
- GitHub Check: Build & Tests / Run Tests (ubuntu-latest) / Testing .NET solution
🔇 Additional comments (14)
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_5e88796b4bfcad1c.verified.json (1)
1-7: LGTM!Valid snapshot file with correct JSON structure for .NET SDK configuration.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_b26fd9e1f79d6874.verified.json (1)
1-7: LGTM!Valid snapshot file with correct JSON structure for .NET SDK configuration.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_67b8267d8efb8d3a.verified.json (1)
1-7: LGTM!Valid snapshot file with correct JSON structure for .NET SDK configuration.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_8d829d263eb16f5b.verified.json (1)
1-7: LGTM!Valid snapshot file with correct JSON structure for .NET SDK configuration.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0953d942c368e5c4.verified.json (1)
1-7: LGTM!Valid snapshot file with correct JSON structure for .NET SDK configuration.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_60da8cc8668b63ea.verified.json (1)
1-7: LGTM!Valid snapshot file with correct JSON structure for .NET SDK configuration.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_0ca2856ff8447f53.verified.json (1)
1-7: LGTM!Valid snapshot file with correct JSON structure for .NET SDK configuration.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_6e38af595c802680.verified.json (1)
1-6: No action needed—this snapshot is correct.The missing
rollForwardfield is intentional. When the test case usesRollForward.None(the default enum value), theGlobalJsonBuilder.RollForwardToString()method returnsnull, and theCreateDocument()method explicitly omits the field from the JSON output. This represents a valid test scenario whererollForwardis not set in the global.json file.Likely an incorrect or invalid review comment.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_88ad7958ed5988b5.verified.json (1)
1-7: LGTM! Valid snapshot for SDK 10.0.100 with prerelease and latestMajor rollForward.The JSON structure correctly represents a global.json configuration matching the test parameters.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_c974ed7e08ea7101.verified.json (1)
1-7: LGTM! Valid snapshot for SDK 8.0.204 without prerelease and latestFeature rollForward.The JSON structure correctly represents a global.json configuration matching the test parameters.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/_snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_ab96645200d2e885.verified.json (1)
1-7: LGTM! Valid snapshot for SDK 8.0.204 with prerelease and latestMinor rollForward.The JSON structure correctly represents a global.json configuration matching the test parameters.
tests/NetEvolve.ProjectBuilders.XUnit.Tests.Integration/Builders/GlobalJsonBuilderTests.cs (3)
1-9: LGTM! Clean test class setup.The use of primary constructor with IClassFixture pattern is a modern and concise approach for test class initialization.
10-24: Excellent test implementation with good practices.The test demonstrates several best practices:
- Proper cancellation token propagation (line 20)
await usingfor async disposable resource management (line 19)- Parameterized snapshot testing with Verify (lines 21-23)
26-42: LGTM! Comprehensive theory data generation.The nested loops efficiently generate all combinations of runtime versions, allowPrerelease values, and rollForward options, ensuring thorough test coverage.
..._snapshots/CreateAsync_Theory_Expected.GlobalJsonBuilderTests_578eeac0664b024e.verified.json
Show resolved
Hide resolved
8631f3f to
42e3b2c
Compare
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.