PowerShell7/test/csharp
Travis Plunk a603cf3867
Update csproj files to the latest version of the package references (#5961)
* Add function which tells you packages which probably need to be updated
2018-01-22 12:06:50 -08:00
..
csharp.tests.csproj Update csproj files to the latest version of the package references (#5961) 2018-01-22 12:06:50 -08:00
README.md Update test documentation 2016-04-04 19:20:26 -07:00
test_Binders.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_CorePsPlatform.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_ExtensionMethods.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_FileSystemProvider.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_MshSnapinInfo.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_PSConfiguration.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_PSVersionInfo.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_Runspace.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_SecuritySupport.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_SessionState.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00
test_Utils.cs Move group policy settings and enable policy controlled logging in PowerShell Core (#5791) 2018-01-08 18:09:00 -08:00

xUnit Tests

These tests are completely Linux specific.

Every test class must belong to [Collection("AssemblyLoadContext")]. This ensures that PowerShell's AssemblyLoadContext is initialized before any other code is executed. When this is not the case, late initialization fails with System.InvalidOperationException : Binding model is already locked for the AppDomain and cannot be reset.

Having every class in the same collection is as close to an xUnit global init hook as can be done.

Running xUnit Tests

Go to the top level of the PowerShell repository and run: Start-PSxUnit inside a self-hosted copy of PowerShell.