Skip to content

Commit 0755375

Browse files
CopilotglennawatsonChrisPulman
authored
Significantly improve ReactiveUI.Uno test coverage from 5.39% to 16.09% and migrate from Moq to NSubstitute (#266)
* Initial plan * Initial assessment and plan for increasing ReactiveUI.Uno test coverage Co-authored-by: glennawatson <[email protected]> * Significantly improve ReactiveUI.Uno test coverage from 5.39% to 14.86% Co-authored-by: glennawatson <[email protected]> * Add comprehensive tests for BooleanToVisibilityHint, ActivationHelper, and expand coverage significantly Co-authored-by: glennawatson <[email protected]> * Significantly expand test coverage with comprehensive edge cases and platform tests - 70 total tests Co-authored-by: glennawatson <[email protected]> * Replace Moq with NSubstitute and fix build environment Co-authored-by: glennawatson <[email protected]> * Changes before error encountered Co-authored-by: glennawatson <[email protected]> * Update target frameworks and clean up test code Added .NET 10 target frameworks to build properties and test projects for future compatibility. Updated Uno.Sdk version in global.json and upgraded ReactiveUI.SourceGenerators in SQLiteStudio sample. Removed redundant copyright/license headers from test files, replaced Assert.Multiple with Assert.EnterMultipleScope for NUnit 4 compatibility, and removed unnecessary System.Private.Uri package reference. * Skip UI tests in headless environments Added SetUp methods to test classes to detect and skip tests when no UI context is available, preventing failures in headless environments. This improves test reliability across different CI and local setups. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: glennawatson <[email protected]> Co-authored-by: Chris Pulman <[email protected]>
1 parent 047736a commit 0755375

23 files changed

+9435
-38
lines changed

Directory.Build.props

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@
1212

1313
<!-- Ensure UnoTargetFrameworks is available from root for Linux compatibility -->
1414
<PropertyGroup>
15-
<!-- Cross-platform .NET 9 target (non-Windows only) -->
16-
<UnoCrossPlatformNet9>net9.0;net9.0-desktop;net9.0-browserwasm</UnoCrossPlatformNet9>
1715

18-
<!-- Windows-specific desktop TFMs (includes Windows-specific .NET 9) -->
19-
<UnoWindowsDesktopTargets>net9.0-windows10.0.19041.0</UnoWindowsDesktopTargets>
16+
<!--<UnoTargetFrameworks>net9.0;net9.0-android;net9.0-browserwasm;net9.0-desktop;net9.0-ios;net9.0-windows10.0.19041.0</UnoTargetFrameworks>-->
17+
18+
<!-- Cross-platform targets (non-Windows only) -->
19+
<UnoCrossPlatformTargets>net9.0;net9.0-desktop;net9.0-browserwasm;net10.0;net10.0-desktop;net10.0-browserwasm</UnoCrossPlatformTargets>
20+
21+
<!-- Windows-specific desktop TFMs -->
22+
<UnoWindowsDesktopTargets>net9.0-windows10.0.19041.0;net10.0-windows10.0.19041.0</UnoWindowsDesktopTargets>
2023

2124
<!-- Mobile TFMs separated by platform -->
22-
<UnoMobileAndroidTargets>net9.0-android</UnoMobileAndroidTargets>
23-
<UnoMobileAppleTargets>net9.0-ios</UnoMobileAppleTargets>
25+
<UnoMobileAndroidTargets>net9.0-android;net10.0-android</UnoMobileAndroidTargets>
26+
<UnoMobileAppleTargets>net9.0-ios;net10.0-ios</UnoMobileAppleTargets>
27+
28+
<!-- Test project target frameworks -->
29+
<TestProjectTargetFrameworks>net9.0;net10.0</TestProjectTargetFrameworks>
2430
</PropertyGroup>
2531

2632
<PropertyGroup>
@@ -36,4 +42,4 @@
3642
<!-- Add Apple Mobile TFMs when building on macOS or Windows (both can compile Apple frameworks) -->
3743
<UnoTargetFrameworks Condition="$([MSBuild]::IsOsPlatform('OSX')) OR $([MSBuild]::IsOsPlatform('Windows'))">$(UnoTargetFrameworks);$(UnoMobileAppleTargets)</UnoTargetFrameworks>
3844
</PropertyGroup>
39-
</Project>
45+
</Project>

Samples/ReactiveUI.Uno.SQLiteStudio/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageVersion Include="ReactiveUI.SourceGenerators" Version="2.4.1" />
6+
<PackageVersion Include="ReactiveUI.SourceGenerators" Version="2.5.1" />
77
<PackageVersion Include="SQLite-net-pcl" Version="1.9.172" />
88
<PackageVersion Include="CsvHelper" Version="33.1.0" />
99
</ItemGroup>
10-
</Project>
10+
</Project>

0 commit comments

Comments
 (0)