Val/988 add mstest4 configuration - #243
Merged
Merged
Conversation
- add MSTestV4MockingContextResolver.cs - create a base class for all mstest resolvers closes #988
ValentinaPetrova
requested review from
MariaDch,
Copilot,
ivo-stoilov and
mbektchiev
November 11, 2025 14:47
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for MSTest version 4 to the JustMock framework by creating a base class abstraction for all MSTest resolvers and introducing a new MSTestV4 resolver. The changes consolidate duplicate code and extend test framework compatibility.
Key Changes:
- Created a new base class
MSTestBaseMockingContextResolverto consolidate common MSTest logic - Added
MSTestV4MockingContextResolverfor MSTest 4 support - Optimized lock scope in
HierarchicalTestFrameworkContextResolverby moving non-critical operations outside the lock
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| MockingContext.cs | Registers the new MSTestV4 resolver |
| MSTestV4MockingContextResolver.cs | New resolver implementation for MSTest 4 framework |
| MSTestV2MockingContextResolver.cs | Refactored to inherit from base class, removing duplicated code |
| MSTestMockingContextResolver.cs | Refactored to inherit from base class, removing duplicated code |
| MSTestBaseMockingContextResolver.cs | New base class containing shared MSTest resolver logic |
| HierarchicalTestFrameworkContextResolver.cs | Lock scope optimization using environment variable flag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ivo-stoilov
approved these changes
Nov 11, 2025
mbektchiev
approved these changes
Nov 11, 2025
MariaDch
approved these changes
Nov 12, 2025
This was referenced Aug 2, 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.
closes telerik/MATTeam#988