Test BumpDotNetVersionStep through its public ExecuteAsync method - #572
Draft
dennisdoomen wants to merge 3 commits into
Draft
Test BumpDotNetVersionStep through its public ExecuteAsync method#572dennisdoomen wants to merge 3 commits into
dennisdoomen wants to merge 3 commits into
Conversation
Returns a unique path under the OS temp directory without creating the file or directory, so tests and tools can build up a scratch location before deciding whether it's a file or directory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replaces the hand-rolled CreateVanillaFixture/Directory.Delete pair with an IDisposable fixture built on AbsolutePath.Temp, and renames the test methods to describe behaviour. Also relaxes the ReSharper async-overload-highlighting rule for tests, where the async-suffix convention adds noise rather than value. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Makes BumpTargetFramework private and rewrites the specs to drive the step through IMigrationStep.ExecuteAsync against real files on disk, demonstrating the pattern for testing migration steps via their public API rather than internal helper methods. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
BumpDotNetVersionStepSpecstestedBumpTargetFramework/BumpSdkVersiondirectly, which forced those helpers to staypubliceven though onlyIMigrationStep.ExecuteAsyncis the step's real contract.What
BumpTargetFrameworkprivate.ExecuteAsyncagainst real files on disk (constructor +IDisposable.Dispose()pattern,AbsolutePath.Temp), asserting on file content andSummarycounts.Dispose()fixture pattern and AAA-comment convention indocs/agents/conventions.md.Demonstrates testing
IMigrationStepimplementations solely through their public method.