21 lines
474 B
C#
21 lines
474 B
C#
using System.Security.Principal;
|
|
using TermRemoteCtl.Agent.Terminal;
|
|
|
|
namespace TermRemoteCtl.Agent.Tests.Terminal;
|
|
|
|
public class ConPtyInteropTests
|
|
{
|
|
[Fact]
|
|
public void GetCurrentWindowsIdentity_Returns_Identity_On_Windows()
|
|
{
|
|
if (!OperatingSystem.IsWindows())
|
|
{
|
|
return;
|
|
}
|
|
|
|
WindowsIdentity identity = ConPtyInterop.GetCurrentWindowsIdentity();
|
|
|
|
Assert.False(string.IsNullOrWhiteSpace(identity.Name));
|
|
}
|
|
}
|