PowerShell7/test/csharp/test_SecuritySupport.cs

36 lines
849 B
C#
Raw Normal View History

2015-06-11 22:15:45 +00:00
using Xunit;
using System;
using System.Management.Automation;
namespace PSTests
{
public static class SecuritySupportTests
{
[Fact]
2015-06-11 22:15:45 +00:00
public static void TestScanContent()
{
Assert.Equal(AmsiUtils.ScanContent("", ""), AmsiUtils.AmsiNativeMethods.AMSI_RESULT.AMSI_RESULT_NOT_DETECTED);
}
[Fact]
2015-06-11 22:15:45 +00:00
public static void TestCurrentDomain_ProcessExit()
{
Assert.Throws<PlatformNotSupportedException>(delegate {
AmsiUtils.CurrentDomain_ProcessExit(null, EventArgs.Empty);
});
2015-06-11 22:15:45 +00:00
}
[Fact]
2015-06-11 22:15:45 +00:00
public static void TestCloseSession()
{
AmsiUtils.CloseSession();
}
[Fact]
2015-06-11 22:15:45 +00:00
public static void TestUninitialize()
{
AmsiUtils.Uninitialize();
}
}
}