Commit 194b4f4
authored
Add comprehensive unit tests for Uno controls and internals (#311)
* Remove SQLiteStudio sample and update configs
Deleted the ReactiveUI.Uno.SQLiteStudio sample project and related files, including test projects and configuration files. Updated .editorconfig to improve organization, add comments, and clarify analyzer rules. Added new documentation and configuration files (CLAUDE.md, agent.md, codecov.yml, etc.), and updated solution and project references accordingly.
* Add .slnx solution, update WinRTAppDataDriver, and add tests
Replaces the .sln solution file with a new .slnx format and updates references accordingly. Enhances WinRTAppDataDriver to implement JSON-based state load/save/invalidate methods and improves error handling. Updates Directory.Build.props to include net9.0 in cross-platform targets and suppresses additional warnings. Adds comprehensive unit tests for activation, bootstrapping, builder extensions, controls, converters, helpers, hooks, observables, platform operations, registrations, resources, schedulers, and storage. Updates example project to suppress more warnings and disables TreatWarningsAsErrors. Simplifies and redirects Copilot instructions to agent.md.
* Add ReactiveUI.Uno.SQLiteStudio example and update Uno builder
Introduces a new example project, ReactiveUI.Uno.SQLiteStudio, demonstrating usage of ReactiveUI with Uno Platform and SQLite. Refactors UnoReactiveUIBuilderExtensions to require the startup window for WithUno, updates scheduler registration, and improves Uno dictionary resource injection. Updates codecov config to ignore examples, adjusts target framework order for Uno cross-platform builds, and includes the new example in the solution.
* Update solution and workflows to use .slnx format
Changed CI and release workflows to reference the .slnx solution file instead of .sln. Updated ReactiveUI.Uno.slnx to include workflow files and set deploy configuration for the SQLiteStudio example project. Fixed test to pass required parameters to WithUno.
* Improve XML docs and remove unused attributes
Enhanced XML documentation for several classes and dependency properties to provide clearer descriptions and usage context. Removed unused or unnecessary RequiresUnreferencedCode attributes and redundant using directives to clean up the codebase.
* Update Android build settings and add PublishTrimmed property
Refines the condition for Android-specific settings to use TargetFramework.EndsWith('0-android'), adds PublishTrimmed property for Android builds, and sets PublishTrimmed to false for non-Android targets. This improves build configuration and output trimming behavior.
* Comment out Android targets in Uno example build
Android target frameworks are now commented out in Directory.Build.props, likely to avoid building Android targets by default. Also, a commented RuntimeIdentifierGraphPath line was removed from the SQLiteStudio example project for cleanup.
* Update ReactiveUI.Uno.SQLiteStudio.csproj
* Update target frameworks and remove obsolete test
Removed 'net9.0-browserwasm' from UnoExampleCrossPlatformNet9 in Directory.Build.props to update supported target frameworks. Also removed the WithDefaultIScreen_HasRequiresUnreferencedCodeAttribute test from UnoReactiveUIBuilderExtensionsTests.cs, likely due to changes in method attributes or relevance.
* Update PublishTrimmed property for iOS and other targets
Added a separate PropertyGroup to enable PublishTrimmed for iOS targets and updated the condition for disabling PublishTrimmed to exclude both Android and iOS. This ensures correct trimming behavior for different platforms.
* Update workflow configs for ReactiveUI.Uno
Removed the solutionFile parameter from ci-build.yml and updated productNamespacePrefix in release.yml to 'ReactiveUI.Uno'. This aligns workflow configuration with the current project structure.
* Add XML documentation to ScheduleSlow method
Added detailed XML comments to the ScheduleSlow<TState> method in UnoDispatcherScheduler.cs to improve code clarity and provide usage information for developers.
* Comment out Apple Mobile TFMs addition in build props
The line adding Apple Mobile Target Frameworks for macOS and Windows builds has been commented out in Directory.Build.props. This may be to temporarily disable building for Apple mobile platforms during certain builds.
* Add comprehensive unit tests for Uno controls and internals
Introduces new test classes for ReactivePage, ReactiveUserControl, RoutedViewHost, ViewModelViewHost, and internal helpers, significantly expanding test coverage for property, activation, and routing behaviors. Also enhances existing tests with additional assertions and affinity checks for DependencyObjectObservableForProperty and ActivationForViewFetcher.1 parent 255a4f3 commit 194b4f4
File tree
8 files changed
+1515
-1
lines changed- src/tests/ReactiveUI.Uno.Tests
- Activation
- Bootstrapping
- Controls
- Internal
- Observable
8 files changed
+1515
-1
lines changedLines changed: 88 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
85 | 172 | | |
86 | 173 | | |
87 | 174 | | |
88 | | - | |
| 175 | + | |
89 | 176 | | |
90 | 177 | | |
91 | 178 | | |
| |||
Lines changed: 117 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
74 | 191 | | |
0 commit comments