public void should_stop_then_start_the_service() { _serviceStopper.Expect(x => x.Stop("testServiceName")); _serviceStarter.Expect(x => x.Start("testServiceName")); _serviceRestarter.Restart("testServiceName"); }
public void should_update_xentools() { _sleeper.Expect(x => x.Sleep(Arg <int> .Is.Anything)); _connectionChecker.Expect(x => x.Check()); _downloader.Expect(x => x.Download("http://something.com/file.zip", Constants.XenToolsReleasePackage)); _checksumValidator.Expect(x => x.Validate("544564abc453de787ad", Constants.XenToolsReleasePackage)); _unzipper.Expect(x => x.Unzip(Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything)); _serviceStopper.Expect(x => x.Stop("RackspaceCloudServersAgentUpdater")); _fileCopier.Expect(x => x.CopyFiles(Constants.UpdaterUnzipPath, Constants.UpdaterPath, _logger)); _finalizer.Expect(x => x.Finalize(new List <string> { Constants.UpdaterUnzipPath, Constants.UpdaterReleasePackage } )); _serviceStarter.Expect(x => x.Start("RackspaceCloudServersAgentUpdater")); _updaterUpdate.Execute(_agentUpdateInfo); }