NuGet Package Xunit.StaFact

Run your xunit-based tests on an STA thread with the WPF Dispatcher, a WinForms SynchronizationContext, or even a cross-platform generic UI thread emulation with a SynchronizationContext that keeps code running on a "main thread" for that test.

Simply use [WpfFact], [WinFormsFact], [StaFact] or the cross-platform [UIFact] on your test method to run your test under conditions that most closely match the main thread in your application.

Theory variants of these attributes allow for parameterized testing.

Check out the xunit.combinatorial nuget package for pairwise or combinatorial testing with theories.




Got any Xunit.StaFact Question?





Info

Version: 1.2.46-alpha
Author(s): Andrew Arnott
Last Update: Tuesday, June 6, 2023
.NET Fiddle: Online Example
Project Url: https://github.com/AArnott/Xunit.StaFact
NuGet Url: https://www.nuget.org/packages/Xunit.StaFact


Install
Install-Package Xunit.StaFact
dotnet add package Xunit.StaFact
paket add Xunit.StaFact
Xunit.StaFact Download (Unzip the "nupkg" after downloading)

.NETStandard 2.0 net472 netcoreapp3.1


Tags



STATS

must-have-score

3.3

avg-downloads-per-day

581

days-since-last-release

296