System.Diagnostics.Tests.ProcessTests.TestGetCurrentProcess C# (CSharp) Method

TestGetCurrentProcess() private method

private TestGetCurrentProcess ( ) : void
return void
        public void TestGetCurrentProcess()
        {
            Process current = Process.GetCurrentProcess();
            Assert.NotNull(current);

            int currentProcessId = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
                Interop.GetCurrentProcessId() :
                Interop.getpid();

            Assert.Equal(currentProcessId, current.Id);
        }
ProcessTests