Test CoreDispatcher support better
- Dominant language
- C#
- Stars
- 7.2k
- Forks
- 798
- PR merge metrics
- No merged PRs in 30d
Description
The various `ObserveOn` and `SubscribeOn` methods that use `CoreDispatcher` are not currently well tested.
This is a challenge because getting a `CoreDispatcher` typically entails having a main window, which can cause problems trying to run tests on a build agent. Historically we have tended to regard `CoreDispatcher` as a UWP-ism, and since support for that has long been on the wane in Microsoft's tools, we've not worried too much. However, this dispatcher is also used in WinUI, so it will be used even when using the very latest desktop frameworks. So we need to get better at it.
Ideally we would also add tests for the UWP-specific overloads (which work with the Xaml `DependencyObject`), because we now support UWP on .NET 9.0+. (Previously we've only supported UAP—the UWP on .NET Native stack.)
This isn't a straightforward matter of adding additional tests. We need to work whether it's event possible to run a `CoreDispatcher` in a headless environment, and to devise a suitable strategy for how to run tests that need a `CoreDispatcher`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.