2015-06-12 18:26:56 +02:00
|
|
|
using Xunit;
|
|
|
|
using System;
|
|
|
|
using System.Management.Automation;
|
|
|
|
|
|
|
|
namespace PSTests
|
|
|
|
{
|
|
|
|
// Not static because a test requires non-const variables
|
2016-03-18 02:15:39 +01:00
|
|
|
[Collection("AssemblyLoadContext")]
|
2015-06-12 18:26:56 +02:00
|
|
|
public class MshSnapinInfoTests
|
|
|
|
{
|
|
|
|
// Test that it does not throw an exception
|
2015-07-21 00:31:03 +02:00
|
|
|
[Fact]
|
2015-06-12 18:26:56 +02:00
|
|
|
public void TestReadRegistryInfo()
|
|
|
|
{
|
|
|
|
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
|
2015-07-21 00:31:03 +02:00
|
|
|
[Fact]
|
2015-06-12 18:26:56 +02:00
|
|
|
public void TestReadCoreEngineSnapIn()
|
|
|
|
{
|
|
|
|
PSSnapInInfo pSSnapInInfo = PSSnapInReader.ReadCoreEngineSnapIn();
|
2016-06-27 20:41:07 +02:00
|
|
|
Assert.Contains("PublicKeyToken=31bf3856ad364e35", pSSnapInInfo.AssemblyName);
|
2015-06-12 18:26:56 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|