mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
## Motivation I have a PR where there are many new xUnit tests. It would also be useful to create new xUnit tests for public APIs. The number of xUnit tests will increase and their ordering is required. ## PR Summary - Move C# xUnit tests in new folder. This allows to put new xUnit tests in directory structure in accordance with directory structure where cs files are. - Use an xUnit TestCaseOrderer attribute to sequentially process tests for `powershell.config.json`. - Update README.md - A race condition was fixed which allowed to run all XUnit tests in single batch job.
30 lines
711 B
C#
30 lines
711 B
C#
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
using Xunit;
|
|
using System;
|
|
using System.Management.Automation;
|
|
|
|
namespace PSTests.Parallel
|
|
{
|
|
public static class SecuritySupportTests
|
|
{
|
|
[Fact]
|
|
public static void TestScanContent()
|
|
{
|
|
Assert.Equal(AmsiUtils.AmsiNativeMethods.AMSI_RESULT.AMSI_RESULT_NOT_DETECTED, AmsiUtils.ScanContent(string.Empty, string.Empty));
|
|
}
|
|
|
|
[Fact]
|
|
public static void TestCloseSession()
|
|
{
|
|
AmsiUtils.CloseSession();
|
|
}
|
|
|
|
[Fact]
|
|
public static void TestUninitialize()
|
|
{
|
|
AmsiUtils.Uninitialize();
|
|
}
|
|
}
|
|
}
|