c1c5344a88
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files. Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks. Separate PR coming to update contribution document for new source files: #6140 Manually reviewed each change. Fix #6073
32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
using Xunit;
|
|
using System;
|
|
using System.Management.Automation;
|
|
|
|
namespace PSTests.Parallel
|
|
{
|
|
// Not static because a test requires non-const variables
|
|
public class MshSnapinInfoTests
|
|
{
|
|
// Test that it does not throw an exception
|
|
[SkippableFact]
|
|
public void TestReadRegistryInfo()
|
|
{
|
|
Skip.IfNot(Platform.IsWindows);
|
|
Version someVersion = null;
|
|
string someString = null;
|
|
PSSnapInReader.ReadRegistryInfo(out someVersion, out someString, out someString, out someString, out someString, out someVersion);
|
|
}
|
|
|
|
// PublicKeyToken is null on Linux
|
|
[SkippableFact]
|
|
public void TestReadCoreEngineSnapIn()
|
|
{
|
|
Skip.IfNot(Platform.IsWindows);
|
|
PSSnapInInfo pSSnapInInfo = PSSnapInReader.ReadCoreEngineSnapIn();
|
|
Assert.Contains("PublicKeyToken=31bf3856ad364e35", pSSnapInInfo.AssemblyName);
|
|
}
|
|
}
|
|
}
|