public void Controller_Updater_UpdaterUpdate() { /* updater requires update, exception generated. User should have started main application first. */ FakeOperations operations = new FakeOperations(false, true); Upgrader.Program._operations = operations; Upgrader.Program.Main_Inner(); operations.AssertCodingSequence(""); }
public void Controller_Updater_UpdateBoth() { /* updater requires update, exception generated. User should have started main application first. */ FakeOperations operations = new FakeOperations(true, true); Upgrader.Program._operations = operations; Upgrader.Program.Main_Inner(); operations.AssertCodingSequence(FakeOperations.UPDATE_APP, FakeOperations.LAUNCH_APP); }
public void Controller_Updater_HappyPath() { /* happy path, both Updater and App do not require update. Application launched.*/ FakeOperations operations = new FakeOperations(false, false); Upgrader.Program._operations = operations; Upgrader.Program.Main_Inner(); operations.AssertCodingSequence(FakeOperations.LAUNCH_APP); }
public void Controller_Updater_AppUpdate() { /* application requires update. it get updated and then launched*/ FakeOperations operations = new FakeOperations(true, false); Upgrader.Program._operations = operations; Upgrader.Program.Main_Inner(); operations.AssertCodingSequence(FakeOperations.UPDATE_APP, FakeOperations.LAUNCH_APP); }
public void Application_Controller_HappyPath() { /* happy path, both Updater and App do not require update. Nothing happens, App restart is not required.*/ FakeOperations operations = new FakeOperations(false, false); Upgrader.Program._operations = operations; bool restart = Upgrader.Program.IsApplicationRestart_Inner(null); operations.AssertCodingSequence(""); Assert.AreEqual(false, restart); }
public void Application_Controller_Both_ThroughUpdater() { /* Both updater and application require update, since application was started through UPADTER, - exception happened. User should have started main application.*/ FakeOperations operations = new FakeOperations(true, true); Upgrader.Program._operations = operations; bool restart = Upgrader.Program.IsApplicationRestart_Inner(UPDATER_ARGS); operations.AssertCodingSequence(""); Assert.AreEqual(false, restart); }
public void Application_Controller_Both() { /* Both updater and application require update, since application was started first, we update updater, launch it to update application and quit. */ FakeOperations operations = new FakeOperations(true, true); Upgrader.Program._operations = operations; bool restart = Upgrader.Program.IsApplicationRestart_Inner(null); operations.AssertCodingSequence(FakeOperations.UPDATE_UPDATER, FakeOperations.LAUNCH_UPDATER); Assert.AreEqual(true, restart); }