Example #1
0
        public void TestInitialize()
        {
            TestCleanup();

            _loggerMock = new LoggerMock();

            _directory = new Directory(_loggerMock);
        }
        public void TestCleanup()
        {
            _cleanupOldUnpackedFilesTest = null;

            _commandResult = null;
            _updatePackageMock = null;
            _directoryMock = null;
            _loggerMock = null;
        }
        public void TestCleanup()
        {
            _runInstallerCommand = null;

            _commandResult = null;
            _updatePackageAccessMock = null;
            _loggerMock = null;

            TryDeleteFile();
        }
Example #4
0
        public void TestCleanup()
        {
            if (System.IO.Directory.Exists(_path))
            {
                System.IO.Directory.Delete(_path, true);
            }

            _directory = null;
            _loggerMock = null;
        }
        public void TestCleanup()
        {
            _updateDatabase = null;

            _commandResult = null;
            _updatePackageAccessMock = null;
            _loggerMock = null;

            TryDeleteFile();
        }
        public void TestInitialize()
        {
            TestCleanup();

            _updatePackageAccessMock = new UpdatePackageAccessMock();

            _updatePackageMock = new UpdatePackageMock();
            _updatePackageMock.Access = _updatePackageAccessMock;

            _loggerMock = new LoggerMock();
            _singleFileMock = new SingleFileMock();
        }
        public void TestInitialize()
        {
            TestCleanup();

            _updatePackageMock = new UpdatePackageMock();
            _updatePackageMock.PackageName = "CheckUrlHttpStatusIs200Test";

            _htmlGetterMock = new Mock<IHtmlGetter>();

            _loggerMock = new LoggerMock();

            _checkUrlHttpStatusIs200 = new CheckUrlHttpStatusIs200(_url, _updatePackageMock, _htmlGetterMock.Object, _loggerMock);
        }
        public void TestCleanup()
        {
            _commandMock = null;
            _commandMockCalledLaterOnTrue = null;
            _commandMockCalledLaterOnFalse = null;

            _loggerMock = null;

            _autoUpdaterWorker = null;

            _queue = null;

            CommandsProducerConsumer.Queue = null;
        }
        public void TestInitialize()
        {
            TestCleanup();

            _commandResult = new CommandResult();

            _updatePackageAccessMock = new UpdatePackageAccessMock();
            _updatePackageAccessMock.GetFilenameOnly = _getFileNameOnly; // wird sowieso nie echt drauf zugegriffen
            _updatePackageMock = new UpdatePackageMock() { Access = _updatePackageAccessMock };

            _directoryMock = new DirectoryMock();

            _loggerMock = new LoggerMock();

            _cleanupOldUnpackedFilesTest = new CleanupOldUnpackedFiles(_workFolder, _updatePackageMock, _directoryMock, _loggerMock);
        }
        public void TestInitialize()
        {
            TestCleanup();

            _commandResult = new CommandResult();

            _updatePackageAccessMock = new UpdatePackageAccessMock();
            _updatePackageAccessMock.GetFilenameOnly = "RunInstallerCommandTest.zip";

            _updatePackageMock = new UpdatePackageMock();
            _updatePackageMock.PackageName = "RunInstallerCommandTest";
            _updatePackageMock.Access = _updatePackageAccessMock;

            _loggerMock = new LoggerMock();

            _runExternalCommandMock = new RunExternalCommandMock();

            TryDeleteFile();

            Directory.CreateDirectory(_updatePackageMock.PackageName);
            File.Copy(_installerCommand, Path.Combine(_updatePackageMock.PackageName, _installerCommand));

            _runInstallerCommand = new RunInstallerCommand(_installerCommand, _installerCommandArguments, _workFolder, _updatePackageMock, _runExternalCommandMock, _loggerMock);
        }
        public void TestCleanup()
        {
            _autoUpdaterCommandCreator = null;

            _loggerMock = null;
        }
        public void TestInitialize()
        {
            TestCleanup();

            _configurationFileAccessMock = new ConfigurationFileAccessMock();
            _loggerMock = new LoggerMock();

            _jsonFileConfiguration = new JsonFileConfiguration(_configurationFileAccessMock, _loggerMock) as IConfiguration;
        }
 public void TestCleanup()
 {
     _loggerMock = null;
     _jsonFileConfiguration = null;
     _configurationFileAccessMock = null;
 }
        public void TestInitialize()
        {
            TestCleanup();

            _commandMock = new CommandMock() { PackageNameResult = "AutoUpdaterWorkerTest" };
            _commandMockCalledLaterOnTrue = new CommandMock() { PackageNameResult = "AutoUpdaterWorkerTest" };
            _commandMockCalledLaterOnFalse = new CommandMock() { PackageNameResult = "AutoUpdaterWorkerTest" };

            _loggerMock = new LoggerMock();

            _queue = new BlockingCollection<Command>();

            _autoUpdaterWorker = new AutoUpdaterWorker(_loggerMock);

            _commandResult = new CommandResult();
        }
        public void TestCleanup()
        {
            _commandBuilder = null;

            _updatePackageMock = null;
            _singleFileMock = null;
            _loggerMock = null;
            _directoryMock = null;
        }
        public void TestInitialize()
        {
            TestCleanup();

            _updatePackageAccessMock = new UpdatePackageAccessMock();
            _updatePackageAccessMock.GetFilenameOnly = _fileName; // wird sowieso nie echt drauf zugegriffen
            _updatePackageMock = new UpdatePackageMock() { Access = _updatePackageAccessMock };
            _updatePackageMock.Settings = new ServerSettings()
            {
                DatabaseUpdaterCommandArguments = "ddl",
                DatabaseUpdaterCommand = "connectionString",
                CheckUrlsAfterInstallation = new[] { "fakeCheckUrl1", "fakeCheckUrl2" },
            };

            _singleFileMock = new SingleFileMock();
            _loggerMock = new LoggerMock();
            _directoryMock = new DirectoryMock();
            _runExternalCommandMock = new RunExternalCommandMock();
            _htmlGetterMock = new Mock<IHtmlGetter>();
            _nowGetterMock = new NowGetterMock();
            _blackboardMock = new Mock<IBlackboard>();

            _commandBuilder = new CommandBuilder(_singleFileMock, _directoryMock, _loggerMock, _runExternalCommandMock, _htmlGetterMock.Object, _nowGetterMock, _blackboardMock.Object);
        }
        public void TestInitialize()
        {
            TestCleanup();

            _settings = new Settings();
            _settings.Global = new GlobalSettings()
            {
                CheckIntervalMinutes = 5
            };

            _nowGetterMock = new NowGetterMock();
            _checkTimerMock = new CheckTimerMock();
            _configurationConverterMock = new ConfigurationConverterMock();
            _commandBuilderMock = new CommandBuilderMock();
            _loggerMock = new LoggerMock();

            _autoUpdaterCommandCreator = new AutoUpdaterCommandCreator(_checkTimerMock, _configurationConverterMock, _commandBuilderMock, _nowGetterMock, _loggerMock);
        }