private void Shutdown() { _logger.Debug("Waiting for all threads to finish"); _threadManager.WaitForThreads(); _pipeServerManager.PrepareShutdown(); _threadManager.Shutdown(); _settingsManager.SaveCurrentSettings(); _jobHistoryManager.Save(); _pipeServerManager.Shutdown(); }
public void ValidateShutdownSequence() { var starter = BuildMaybePipedApplicationStarter(0); starter.SendMessageOrStartApplication(() => "", () => false, false); Received.InOrder(() => { _settingsManager.LoadAllSettings(); _threadManager.WaitForThreads(); _pipeServerManager.PrepareShutdown(); _threadManager.Shutdown(); _settingsManager.SaveCurrentSettings(); _jobHistoryManager.Save(); _pipeServerManager.Shutdown(); }); }
public void Save_CallsJobHistoryStorageSave() { _jobHistoryManager.Save(); _jobHistoryStorage.Received(1).Save(_jobHistoryManager.History); }