public void WhenProcessDoesNotExist_ReturnsNull() { var processHelper = new ProcessHelper(); var result = processHelper.GetProcessById(1); Assert.Null(result); }
public void WhenProcessDoesNotExist_ReturnsNull() { var processHelper = new ProcessHelper(); var result = processHelper.GetProcessById(1); Assert.Null(result); }
public void WhenProcessIsValid_ReturnsProcess() { Process p = Process.Start("cmd.exe"); try { var processHelper = new ProcessHelper(); var result = processHelper.GetProcessById(p.Id); Assert.NotNull(result); Assert.Equal(p.Id, result.Id); } finally { p.Kill(); } }
public void WhenProcessIsValid_ReturnsProcess() { Process p = Process.Start("cmd.exe"); try { var processHelper = new ProcessHelper(); var result = processHelper.GetProcessById(p.Id); Assert.NotNull(result); Assert.Equal(p.Id, result.Id); } finally { p.Kill(); } }