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);
        }
Exemplo n.º 2
0
        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);
        }