The test requires notepad.exe and that is not available on Win Server
Core. Fixes dotnet/corefx#24912.
Commit migrated from https://github.com/dotnet/corefx/commit/
b94869b1c55b17361f3931da1274e4b58f2a18e6
{
public class ManagementObjectTests
{
+ // Need a specific condition for the test requiring notepad since not all windows versions that support WMI have it
+ public static bool IsWmiSupportedAndHasNotepad => WmiTestHelper.IsWmiSupported && PlatformDetection.IsNotWindowsServerCore;
+
[ConditionalFact(typeof(WmiTestHelper), nameof(WmiTestHelper.IsWmiSupported))]
public void Get_Win32_LogicalDisk()
{
}
}
- [ConditionalFact(typeof(WmiTestHelper), nameof(WmiTestHelper.IsWmiSupported))]
+ [ConditionalFact(nameof(IsWmiSupportedAndHasNotepad))]
[OuterLoop]
public void Invoke_Instance_And_Static_Method_Win32_Process()
{