public void Restart_WillShutdownThroughDispatcher_Always() { var restarter = new Fake_AppRestarter(); restarter.Restart(); Assert.IsTrue(restarter.CalledShutdownApplicationThroughBeginInvoke); }
public void Restart_WillShutdownProcessAfterLaunchingAnotherInstance_Always() { var restarter = new Fake_AppRestarter(); restarter.ForcedCurrentProcessAssemblyLocation = "dummyProcess.exe"; restarter.Restart(); Assert.IsTrue(restarter.CalledShutdownApplication); }
public void Restart_WillSpawnSameProcessAgain_Always() { var restarter = new Fake_AppRestarter(); restarter.ForcedCurrentProcessAssemblyLocation = "dummyProcess.exe"; restarter.Restart(); Assert.AreEqual("dummyProcess.exe", restarter.ProcessStartedFilename); Assert.AreEqual(null, restarter.ProcessStartedArguments); }