Convert Maui27202 and Maui28711 tests from NUnit to XUnit#33061
Merged
Convert Maui27202 and Maui28711 tests from NUnit to XUnit#33061
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 33061Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 33061" |
StephaneDelcroix
approved these changes
Dec 8, 2025
Member
Author
|
/backport release/10.0.1xx-sr2 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR converts two XAML unit test files from NUnit to XUnit, aligning them with the current testing framework standard used throughout the Controls.Xaml.UnitTests project.
Key Changes
- Converted test framework attributes from NUnit to XUnit syntax (
[TestFixture]→[Collection("Issue")],[Test]→[Theory],[Values]→[XamlInflatorData]) - Replaced NUnit-style assertions with XUnit equivalents (
Assert.That()→Assert.Equal()/Assert.NotNull()/Assert.True()) - Updated lifecycle methods from NUnit to XUnit patterns (
[SetUp]/[TearDown]→ Constructor/IDisposable)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Controls/tests/Xaml.UnitTests/Issues/Maui28711.xaml.cs | Converted test for verifying x:Name on SolidColorBrush resources; changed from NUnit to XUnit with proper assertion syntax |
| src/Controls/tests/Xaml.UnitTests/Issues/Maui27202.xaml.cs | Converted test for derived styles inheriting VisualStateManager; migrated setup/teardown to constructor/IDisposable pattern and updated assertions to XUnit |
Member
Author
|
/backport to release/10.0.1xx-sr2 |
Contributor
|
Started backporting to |
Member
Author
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.