/// <summary> /// Validate the <see cref="RunningProcesses" /> returned from the tests. /// </summary> /// <param name="runningProcesses">The <see cref="RunningProcesses" /> to validate.</param> private static void ValidateRunningProcessesAsync(RunningProcesses runningProcesses) { List <DeviceProcessInfo> processes = runningProcesses.Processes; // Check some known things about this response. Assert.AreEqual(75, processes.Count); DeviceProcessInfo systemIdleprocess = processes[0]; Assert.IsNull(systemIdleprocess.AppName); Assert.AreEqual(systemIdleprocess.CpuUsage, 0); Assert.IsFalse(systemIdleprocess.IsRunning); Assert.IsFalse(systemIdleprocess.IsXAP); Assert.AreEqual(systemIdleprocess.Name, "System Idle Process"); Assert.IsNull(systemIdleprocess.PackageFullName); Assert.AreEqual(systemIdleprocess.PageFile, 0U); Assert.AreEqual(systemIdleprocess.PrivateWorkingSet, 4096U); Assert.AreEqual(systemIdleprocess.ProcessId, 0U); Assert.IsNull(systemIdleprocess.Publisher); Assert.AreEqual(systemIdleprocess.SessionId, 0U); Assert.AreEqual(systemIdleprocess.TotalCommit, 0U); Assert.AreEqual(systemIdleprocess.UserName, "NT AUTHORITY\\SYSTEM"); Assert.IsNull(systemIdleprocess.Version); Assert.AreEqual(systemIdleprocess.VirtualSize, 65536U); Assert.AreEqual(systemIdleprocess.WorkingSet, 4096U); DeviceProcessInfo devHomeProcess = processes[56]; Assert.AreEqual(devHomeProcess.AppName, "Dev Home"); Assert.AreEqual(devHomeProcess.CpuUsage, 0); Assert.IsFalse(devHomeProcess.IsRunning); Assert.IsFalse(devHomeProcess.IsXAP); Assert.AreEqual(devHomeProcess.Name, "WWAHost.exe"); Assert.AreEqual(devHomeProcess.PackageFullName, "Microsoft.Xbox.DevHome_100.1607.9000.0_x64__8wekyb3d8bbwe"); Assert.AreEqual(devHomeProcess.PageFile, 47067136U); Assert.AreEqual(devHomeProcess.PrivateWorkingSet, 32796672U); Assert.AreEqual(devHomeProcess.ProcessId, 3424U); Assert.AreEqual(devHomeProcess.Publisher, "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"); Assert.AreEqual(devHomeProcess.SessionId, 0U); Assert.AreEqual(devHomeProcess.TotalCommit, 49213440U); Assert.AreEqual(devHomeProcess.UserName, "TESTXBOX\\DefaultAccount"); Assert.AreEqual(devHomeProcess.Version.Build, 9000U); Assert.AreEqual(devHomeProcess.Version.Major, 100U); Assert.AreEqual(devHomeProcess.Version.Minor, 1607U); Assert.AreEqual(devHomeProcess.Version.Revision, 0U); Assert.AreEqual(devHomeProcess.VirtualSize, 2234032066560U); Assert.AreEqual(devHomeProcess.WorkingSet, 79466496U); }
/// <summary> /// Validate the <see cref="RunningProcesses" /> returned from the tests. /// </summary> /// <param name="runningProcesses">The <see cref="RunningProcesses" /> to validate.</param> private static void ValidateRunningProcesses(RunningProcesses runningProcesses) { List <DeviceProcessInfo> processes = new List <DeviceProcessInfo>(runningProcesses.Processes); // Check some known things about this response. Assert.AreEqual(2, processes.Count); DeviceProcessInfo systemIdleprocess = processes[0]; Assert.IsNull(systemIdleprocess.AppName); Assert.AreEqual(systemIdleprocess.CpuUsage, 0); Assert.IsFalse(systemIdleprocess.IsRunning); Assert.IsFalse(systemIdleprocess.IsXAP); Assert.AreEqual(systemIdleprocess.Name, "System Idle Process"); Assert.IsNull(systemIdleprocess.PackageFullName); Assert.AreEqual(systemIdleprocess.PageFile, 0U); Assert.AreEqual(systemIdleprocess.PrivateWorkingSet, 4096); Assert.AreEqual(systemIdleprocess.ProcessId, 0); Assert.IsNull(systemIdleprocess.Publisher); Assert.AreEqual(systemIdleprocess.SessionId, 0U); Assert.AreEqual(systemIdleprocess.TotalCommit, 0); Assert.AreEqual(systemIdleprocess.UserName, "NT AUTHORITY\\SYSTEM"); Assert.IsNull(systemIdleprocess.Version); Assert.AreEqual(systemIdleprocess.VirtualSize, 65536); Assert.AreEqual(systemIdleprocess.WorkingSet, 4096U); DeviceProcessInfo devHomeProcess = processes[1]; Assert.IsNull(devHomeProcess.AppName); Assert.AreEqual(devHomeProcess.CpuUsage, 0); Assert.IsFalse(devHomeProcess.IsRunning); Assert.IsFalse(devHomeProcess.IsXAP); Assert.AreEqual(devHomeProcess.Name, "svchost.exe"); Assert.IsNull(devHomeProcess.PackageFullName); Assert.AreEqual(devHomeProcess.PageFile, 5472256U); Assert.AreEqual(devHomeProcess.PrivateWorkingSet, 4755456); Assert.AreEqual(devHomeProcess.ProcessId, 892); Assert.IsNull(devHomeProcess.Publisher); Assert.AreEqual(devHomeProcess.SessionId, 0U); Assert.AreEqual(devHomeProcess.TotalCommit, 5914624); Assert.AreEqual(devHomeProcess.UserName, "NT AUTHORITY\\SYSTEM"); Assert.IsNull(devHomeProcess.Version); Assert.AreEqual(devHomeProcess.VirtualSize, 2203387539456); Assert.AreEqual(devHomeProcess.WorkingSet, 17285120U); }
public HoloLensProcessInfo(DeviceProcessInfo deviceProcessInfo) { _deviceProcessInfo = deviceProcessInfo; }