Download PowerShell-master/test/xUnit/csharp/test_MshSnapinInfo.cs from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/xUnit/csharp/test_MshSnapinInfo.cs
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/test/xUnit/csharp/test_MshSnapinInfo.cs
-
curl -L -o test_MshSnapinInfo.cs https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/xUnit/csharp/test_MshSnapinInfo.cs
1.02 kB
| // Copyright (c) Microsoft Corporation. | |
| // Licensed under the MIT License. | |
| using System; | |
| using System.Management.Automation; | |
| using Xunit; | |
| namespace PSTests.Parallel | |
| { | |
| // Not static because a test requires non-const variables | |
| public class MshSnapinInfoTests | |
| { | |
| // Test that it does not throw an exception | |
| [] | |
| public void TestReadRegistryInfo() | |
| { | |
| Skip.IfNot(Platform.IsWindows); | |
| Version someVersion = null; | |
| string someString = null; | |
| PSSnapInReader.ReadRegistryInfo(out someVersion, out someString, out someString, out someString, out someVersion); | |
| } | |
| // PublicKeyToken is null on Linux | |
| [] | |
| public void TestReadCoreEngineSnapIn() | |
| { | |
| Skip.IfNot(Platform.IsWindows); | |
| PSSnapInInfo pSSnapInInfo = PSSnapInReader.ReadCoreEngineSnapIn(); | |
| Assert.Contains("PublicKeyToken=31bf3856ad364e35", pSSnapInInfo.AssemblyName); | |
| } | |
| } | |
| } | |