* Run unit tests that create a UI dispatcher in a scope
Seventy-two Avalonia.Base.UnitTests classes create Dispatcher.UIThread
without ScopedTestBase or UnitTestApplication and never release it, and
TestWithServicesBase, the base of two more, creates one while disposing. The
dispatcher stays bound to the thread that created it; tests run one at a time
but not on one thread, so when the next test lands on another thread
bindings post their values instead of publishing them and whole classes such
as BindingExpressionTests and SetterTests fail.
- Derive those classes from ScopedTestBase, which resets the dispatcher and
the locator around every test.
- Move GlyphRunTests and DiagnosticTextRendererTests from TestWithServicesBase
to ScopedTestBase and delete TestWithServicesBase, which only scoped the
locator.
* Add failing tests for VerifyEmptyDispatcherAfterTest leak detection
An unscoped test that leaves Dispatcher.UIThread behind passes today and
breaks whichever test next runs on another thread. The attribute's own check
also creates a UI dispatcher after tests that never touched one.
* Fail unscoped tests that leave a UI dispatcher behind
VerifyEmptyDispatcherAfterTest only checked for leftover jobs, so a test that
created Dispatcher.UIThread outside ScopedTestBase or UnitTestApplication
passed and broke whichever test next ran on another thread. Its own check
also created a UI dispatcher after tests that never touched one.
- Look the dispatcher up with TryGetUIThread instead of creating one.
- Fail when an unscoped test leaves a UI dispatcher, listing any leftover
jobs as before, and release it so the failure stays with that test.
* Update to xunit.v3
* Little more progress
* More fixes
* Keep VSTest supported
* Adjust Nuke
* Few fixes
* Fix for xunit 2
* Fix GetData override
* Adjust
* Use MTP for xunit 2
* Fix test
* Better fix
* --no-progress
* Few more fixes
* no progress
* Fix test
* Better fix
* TRX
* Move to Directory.Build.props
* Unify on MTP v2
* Update
* Update to stable
* 1.0.1
* 1.0.2
* Fix some warnings
* Fix more warnings
* Fix more warnings
* Enable nullability in UnitTests
* Enable nullability in Base.UnitTests
* Enable nullability in Markup.UnitTests
* Enable nullability in Markup.Xaml.UnitTests
* test: CommandParameter does not change between CanExecute and Execute
* feat: CommandParameter does not change between CanExecute and Execute
* test: update
* Merge core libraries.
Everything below `Avalonia.Controls` into `Avalonia.Base`.
* Move new files to correct place.
* Removed unused dirs/projects,
* Removed outdated references from theme assemblies.
* Merge unit tests to match new assembly layout.
* Fixup test namespaces.
* Make directory match namespace.
* Move files to match namespace.
* Move files to match namespace.
* Fix up incorrect namespace.
`Avalonia.Visuals.Media.Imaging` -> `Avalonia.Media.Imaging`.
* Fix resource URL.
* Removed outdated dependencies.
* Added missing project reference.
* Update test namespaces.
* Fix merge error.
* Fix merge errors.
* Fix bad merge in WindowsInteropTest.csproj.
* Fix up merge errors in csprojs.
* Remove merged tests from nuke.
* Fix up namespace.
* Fix compile error.
* Fix failing tests.
Now that more unit tests are present in Avalonia.Base.UnitTests, general `AvaloniaObject` properties are getting registered. Ignore those.
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>