public XentoolsUpdate(ISleeper sleeper, IDownloader downloader, IChecksumValidator checksumValidator, IUnzipper unzipper, IInstaller installer, IFinalizer finalizer, IServiceRestarter _serviceRestarter, IConnectionChecker connectionChecker, IAgentUpdateMessageHandler agentUpdateMessageHandler, ILogger logger, IXenToolsUpdateSubActions xenToolsUpdateSubActions)
 {
     _sleeper                   = sleeper;
     _downloader                = downloader;
     _checksumValidator         = checksumValidator;
     _unzipper                  = unzipper;
     _installer                 = installer;
     _finalizer                 = finalizer;
     this._serviceRestarter     = _serviceRestarter;
     _connectionChecker         = connectionChecker;
     _agentUpdateMessageHandler = agentUpdateMessageHandler;
     _logger = logger;
     _xenToolsUpdateSubActions = xenToolsUpdateSubActions;
 }
 public XentoolsUpdate(ISleeper sleeper, IDownloader downloader, IChecksumValidator checksumValidator, IUnzipper unzipper, IInstaller installer, IFinalizer finalizer, IServiceRestarter _serviceRestarter,IConnectionChecker connectionChecker, IAgentUpdateMessageHandler agentUpdateMessageHandler, ILogger logger, IXenToolsUpdateSubActions xenToolsUpdateSubActions)
 {
     _sleeper = sleeper;
     _downloader = downloader;
     _checksumValidator = checksumValidator;
     _unzipper = unzipper;
     _installer = installer;
     _finalizer = finalizer;
     this._serviceRestarter = _serviceRestarter;
     _connectionChecker = connectionChecker;
     _agentUpdateMessageHandler = agentUpdateMessageHandler;
     _logger = logger;
     _xenToolsUpdateSubActions = xenToolsUpdateSubActions;
 }
Ejemplo n.º 3
0
        public void Setup()
        {
            _mockRepo        = new MockRepository();
            _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>();
            _xenToolsUpdateSubActions  = MockRepository.GenerateMock <IXenToolsUpdateSubActions>();
            _serviceRestarter          = _mockRepo.StrictMock <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, _xenToolsUpdateSubActions);
        }
        public void Setup()
        {
            _mockRepo = new MockRepository();
            _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>();
            _xenToolsUpdateSubActions = MockRepository.GenerateMock<IXenToolsUpdateSubActions>();
            _serviceRestarter = _mockRepo.StrictMock<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, _xenToolsUpdateSubActions);
        }
 public XenToolsUpdateActions(ILogger logger, IXenToolsUpdateSubActions xenToolsUpdateSubActions, ICommandFactory commandFactory)
 {
     _logger = logger;
     _xenToolsUpdateSubActions = xenToolsUpdateSubActions;
     _factory = commandFactory;
 }
 public XenToolsUpdateActions(ILogger logger, IXenToolsUpdateSubActions xenToolsUpdateSubActions, ICommandFactory commandFactory)
 {
     _logger = logger;
     _xenToolsUpdateSubActions = xenToolsUpdateSubActions;
     _factory = commandFactory;
 }