forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_SecuritySupport.cs
More file actions
36 lines (32 loc) · 889 Bytes
/
test_SecuritySupport.cs
File metadata and controls
36 lines (32 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using Xunit;
using System;
using System.Management.Automation;
namespace PSTests
{
[Collection("AssemblyLoadContext")]
public static class SecuritySupportTests
{
[Fact]
public static void TestScanContent()
{
Assert.Equal(AmsiUtils.ScanContent("", ""), AmsiUtils.AmsiNativeMethods.AMSI_RESULT.AMSI_RESULT_NOT_DETECTED);
}
[Fact]
public static void TestCurrentDomain_ProcessExit()
{
Assert.Throws<PlatformNotSupportedException>(delegate {
AmsiUtils.CurrentDomain_ProcessExit(null, EventArgs.Empty);
});
}
[Fact]
public static void TestCloseSession()
{
AmsiUtils.CloseSession();
}
[Fact]
public static void TestUninitialize()
{
AmsiUtils.Uninitialize();
}
}
}