Merged
Conversation
Upgraded MSTest.TestAdapter and MSTest.TestFramework from version 3.11.0 to 4.0.1 across all unit test project files to ensure compatibility with the latest features and bug fixes.
Updated all unit tests to consistently use the expected value as the first argument in Assert.AreEqual calls. This improves readability and aligns with best practices for test assertions.
Replaces usages of Assert.AreEqual, Assert.IsTrue, and similar assertions with new helper methods such as Assert.HasCount, Assert.IsEmpty, Assert.IsNull, and Assert.IsGreaterThanOrEqualTo across multiple test files. This improves test readability and consistency with updated assertion APIs.
Updated all usages of Assert.HasCount to explicitly cast stream.Position to int. This ensures type consistency and prevents potential issues when stream.Position is a long.
Updated unit tests in Test_ObservableValidator.cs to use Assert.HasCount instead of Assert.AreEqual for collection count assertions. This improves clarity and consistency in test assertions.
Updated assertions in Test_RelayCommandAttribute_WithPartialCommandMethodDefinitions to assign results to the discard variable, improving code clarity and suppressing possible warnings about unused return values.
Replaces Assert.IsTrue(!...) with Assert.IsFalse(...) for clarity in the Test_ObservableValidator_ValidateReturn test.
Added the Microsoft.VisualStudio.TestTools.UnitTesting.ParallelizeAttribute to all MSTest-based unit test project files to enable parallel test execution. This change should improve test run performance by allowing tests to run concurrently.
Moved the ParallelizeAttribute configuration from individual test project files to the shared Community.Toolkit.Common.targets file. This centralizes the configuration and ensures all test projects run tests in parallel by default.
This was referenced Mar 24, 2026
This was referenced Mar 30, 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.
Title. Also applies all code fixes and addresses all warnings.
PR Checklist