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