Fix double using directive. Use Verify for snapshots.#36
Merged
Dreamescaper merged 1 commit intomasterfrom May 1, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the duplicate using directive issue and replaces legacy snapshot verification with asynchronous VerifyNUnit calls.
- Removed unnecessary using directives and legacy snapshot regeneration code.
- Updated test methods to use async/await and added a new test for cancellation token support.
- Adjusted client command namespace generation by removing conditional addition of System.Threading.
Reviewed Changes
Copilot reviewed 11 out of 17 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.cs | Removed redundant using directives and legacy snapshot logic; updated tests to async patterns and added cancellation token support. |
| Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.GenerationTest_* | Updated auto-generated verified files with minor comment cleanups. |
| GenerateAspNetCoreClient.Command/GenerateClientCommand.cs | Removed conditional appending of "System.Threading" from the imported namespaces. |
Files not reviewed (6)
- GenerateAspNetCoreClient.Command/GenerateAspNetCoreClient.Command.csproj: Language not supported
- Tests/GenerateAspNetCoreClient.Tests/GenerateAspNetCoreClient.Tests.csproj: Language not supported
- Tests/OutputTest/OutputProject.csproj: Language not supported
- Tests/TestWebApi.Controllers/TestWebApi.Controllers.csproj: Language not supported
- Tests/TestWebApi.MinimalApi/TestWebApi.MinimalApi.csproj: Language not supported
- Tests/TestWebApi.Versioning/TestWebApi.Versioning.csproj: Language not supported
Comments suppressed due to low confidence (2)
GenerateAspNetCoreClient.Command/GenerateClientCommand.cs:126
- Verify that the removal of the conditional inclusion of 'System.Threading' does not cause issues in scenarios where cancellation token parameters are used; ensure that this namespace is imported by other means if needed.
if (options.AddCancellationTokenParameters)
Tests/GenerateAspNetCoreClient.Tests/ClientGenerationTests.cs:16
- [nitpick] Ensure that removing the snapshot regeneration logic does not hinder future snapshot updates; consider whether a mechanism for snapshot regeneration might be needed later.
- private static readonly bool _regenerateSnapshots = false;
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.
Fixes #35 .