public void QueryChildProcesses() { uint id = ProcessHelper.ByName("wininit.exe").Single().ProcessId.Value; IEnumerable <Win32Process> childProcesses = ProcessHelper.ChildProcesses(id); EnumerableAssert.Multiple(childProcesses); }
public void QueryByNameTest() { IEnumerable <Win32Process> processes = ProcessHelper.ByName("System Idle Process"); EnumerableAssert.Single(processes); processes = ProcessHelper.ByName("svchost.exe"); EnumerableAssert.Multiple(processes); }
public void QueryAllParentProcesses() { Win32Process[] processes = ProcessHelper.ByName("svchost.exe").ToArray(); EnumerableAssert.Any(processes); processes.ForEach(process => { IEnumerable <Win32Process> parentProcesses = ProcessHelper.AllParentProcess(process.ProcessId.Value); EnumerableAssert.Multiple(parentProcesses); }); }
public void QueryParentProcess() { Win32Process[] processes = ProcessHelper.ByName("svchost.exe").ToArray(); EnumerableAssert.Any(processes); processes.ForEach(process => { Win32Process parentProcess = ProcessHelper.ParentProcess(process.ProcessId.Value); Assert.IsNotNull(parentProcess); }); }
public void QueryAllChildProcesses() { uint id = ProcessHelper.ByName("wininit.exe").Single().ProcessId.Value; IEnumerable <Win32Process> tree = ProcessHelper.AllChildProcesses(id); EnumerableAssert.Multiple(tree); IEnumerable <Win32Process> childProcesses = ProcessHelper.ChildProcesses(id); Assert.IsTrue(tree.Count() > childProcesses.Count()); }