public XentoolsUpdate(ISleeper sleeper, IDownloader downloader, IChecksumValidator checksumValidator, IUnzipper unzipper, IInstaller installer, IFinalizer finalizer, IServiceRestarter _serviceRestarter, IConnectionChecker connectionChecker, IAgentUpdateMessageHandler agentUpdateMessageHandler, ILogger logger) { _sleeper = sleeper; _downloader = downloader; _checksumValidator = checksumValidator; _unzipper = unzipper; _installer = installer; _finalizer = finalizer; this._serviceRestarter = _serviceRestarter; _connectionChecker = connectionChecker; _agentUpdateMessageHandler = agentUpdateMessageHandler; _logger = logger; }
public XentoolsUpdate(ISleeper sleeper, IDownloader downloader, IChecksumValidator checksumValidator, IUnzipper unzipper, IInstaller installer, IFinalizer finalizer, IServiceRestarter _serviceRestarter,IConnectionChecker connectionChecker, IAgentUpdateMessageHandler agentUpdateMessageHandler, ILogger logger) { _sleeper = sleeper; _downloader = downloader; _checksumValidator = checksumValidator; _unzipper = unzipper; _installer = installer; _finalizer = finalizer; this._serviceRestarter = _serviceRestarter; _connectionChecker = connectionChecker; _agentUpdateMessageHandler = agentUpdateMessageHandler; _logger = logger; }
public EnsureMinAgentUpdater(ISleeper sleeper, IUnzipper unzipper, IFileCopier fileCopier, IFinalizer finalizer, IServiceStopper serviceStopper, IServiceStarter serviceStarter, ILogger logger, IBackupUpdater backupUpdater, IExtractEmbededResource extractEmbededResource, IVersionChecker versionChecker) { _sleeper = sleeper; _unzipper = unzipper; _fileCopier = fileCopier; _finalizer = finalizer; _serviceStopper = serviceStopper; _serviceStarter = serviceStarter; _logger = logger; _backupUpdater = backupUpdater; _extractEmbededResource = extractEmbededResource; _versionChecker = versionChecker; }
public void Setup() { logger = MockRepository.GenerateMock<ILogger>(); finalizer = new Finalizer(logger); logger.Stub(x => x.Log(Arg<string>.Is.Anything)); CreateFile("test.txt"); Directory.CreateDirectory("test_directory"); for (var i = 10; i < 10; i++) { CreateFile("test_directory\\test" + i + ".txt"); } }
public void Setup() { logger = MockRepository.GenerateMock <ILogger>(); finalizer = new Finalizer(logger); logger.Stub(x => x.Log(Arg <string> .Is.Anything)); CreateFile("test.txt"); Directory.CreateDirectory("test_directory"); for (var i = 10; i < 10; i++) { CreateFile("test_directory\\test" + i + ".txt"); } }
public UpdaterUpdate(ISleeper sleeper, IDownloader downloader, IChecksumValidator checksumValidator, IUnzipper unzipper, IFileCopier fileCopier, IFinalizer finalizer, IServiceStopper serviceStopper, IServiceStarter serviceStarter, IConnectionChecker connectionChecker, IAgentUpdateMessageHandler agentUpdateMessageHandler, ILogger logger) { _sleeper = sleeper; _downloader = downloader; _checksumValidator = checksumValidator; _unzipper = unzipper; _fileCopier = fileCopier; _finalizer = finalizer; _serviceStopper = serviceStopper; _serviceStarter = serviceStarter; _connectionChecker = connectionChecker; _agentUpdateMessageHandler = agentUpdateMessageHandler; _logger = logger; }
public void Setup() { _agentUpdateInfo = "http://something.com/file.zip,544564abc453de787ad"; _downloader = MockRepository.GenerateMock <IDownloader>(); _checksumValidator = MockRepository.GenerateMock <IChecksumValidator>(); _unzipper = MockRepository.GenerateMock <IUnzipper>(); _installer = MockRepository.GenerateMock <IInstaller>(); _finalizer = MockRepository.GenerateMock <IFinalizer>(); _connectionChecker = MockRepository.GenerateMock <IConnectionChecker>(); _sleeper = MockRepository.GenerateMock <ISleeper>(); _logger = MockRepository.GenerateMock <ILogger>(); _serviceRestarter = MockRepository.GenerateMock <IServiceRestarter>(); _agentUpdateMessageHandler = new AgentUpdateMessageHandler(); _logger.Stub(x => x.Log(Arg <string> .Is.Anything)); _xentoolsUpdate = new XentoolsUpdate(_sleeper, _downloader, _checksumValidator, _unzipper, _installer, _finalizer, _serviceRestarter, _connectionChecker, _agentUpdateMessageHandler, _logger); }
public void Setup() { _agentUpdateInfo = "http://something.com/file.zip,544564abc453de787ad"; _downloader = MockRepository.GenerateMock<IDownloader>(); _checksumValidator = MockRepository.GenerateMock<IChecksumValidator>(); _unzipper = MockRepository.GenerateMock<IUnzipper>(); _installer = MockRepository.GenerateMock<IInstaller>(); _finalizer = MockRepository.GenerateMock<IFinalizer>(); _connectionChecker = MockRepository.GenerateMock<IConnectionChecker>(); _sleeper = MockRepository.GenerateMock<ISleeper>(); _logger = MockRepository.GenerateMock<ILogger>(); _serviceRestarter = MockRepository.GenerateMock<IServiceRestarter>(); _agentUpdateMessageHandler = new AgentUpdateMessageHandler(); _logger.Stub(x => x.Log(Arg<string>.Is.Anything)); _xentoolsUpdate = new XentoolsUpdate(_sleeper, _downloader, _checksumValidator, _unzipper, _installer, _finalizer, _serviceRestarter, _connectionChecker, _agentUpdateMessageHandler, _logger); }
public void Register(IFinalizer finalizer) { Finalizers.Add(finalizer); }