コード例 #1
0
ファイル: InstallFixture.cs プロジェクト: gitter-badger/cli-2
        // all the tests assume that the msi to be tested is available via environment variable %CLI_MSI%

        public InstallFixture()
        {
            string msiFile = Environment.GetEnvironmentVariable("CLI_MSI");

            _msiMgr = new MsiManager(msiFile);

            // make sure that the msi is not already installed, if so the machine is in a bad state
            Assert.False(_msiMgr.IsInstalled, "The dotnet CLI msi is already installed");

            _msiMgr.Install(InstallLocation);
            Assert.True(_msiMgr.IsInstalled);
        }
コード例 #2
0
ファイル: InstallFixture.cs プロジェクト: yonglehou/cli-1
        // all the tests assume that the msi to be tested is available via environment variable %CLI_MSI%

        public InstallFixture()
        {
            string msiFile = Environment.GetEnvironmentVariable("CLI_MSI");

            _msiMgr = new MsiManager(msiFile);

            // make sure that the msi is not already installed, if so the machine is in a bad state
            Assert.False(_msiMgr.IsInstalled, "The dotnet CLI msi is already installed");

            _msiMgr.Install(InstallLocation);
            Assert.True(_msiMgr.IsInstalled);
        }
コード例 #3
0
        public void InstallTest()
        {
            string expectedInstallLocation = Environment.ExpandEnvironmentVariables(@"%ProgramFiles%\dotnet");

            // make sure that the msi is not already installed, if so the machine is in a bad state
            Assert.False(_msiMgr.IsInstalled, "The dotnet CLI msi is already installed");
            Assert.False(Directory.Exists(expectedInstallLocation));

            _msiMgr.Install();
            Assert.True(_msiMgr.IsInstalled);
            Assert.True(Directory.Exists(expectedInstallLocation));

            _msiMgr.UnInstall();
            Assert.False(_msiMgr.IsInstalled);
            Assert.False(Directory.Exists(expectedInstallLocation));
        }
コード例 #4
0
ファイル: InstallFixture.cs プロジェクト: ericstj/cli
        // all the tests assume that the msi to be tested is available via environment variable %CLI_MSI%

        public InstallFixture()
        {
            string msiFile = Environment.GetEnvironmentVariable("CLI_MSI");
            if(string.IsNullOrEmpty(msiFile))
            {
                throw new InvalidOperationException("%CLI_MSI% must point to the msi that is to be tested");
            }

            _msiMgr = new MsiManager(msiFile);

            // make sure that the msi is not already installed, if so the machine is in a bad state
            Assert.False(_msiMgr.IsInstalled, "The dotnet CLI msi is already installed");

            _msiMgr.Install(InstallLocation);
            Assert.True(_msiMgr.IsInstalled);
        }
コード例 #5
0
ファイル: InstallFixture.cs プロジェクト: qanon1111/cli-1
        // all the tests assume that the msi to be tested is available via environment variable %CLI_MSI%

        public InstallFixture()
        {
            string msiFile = Environment.GetEnvironmentVariable("CLI_MSI");

            if (string.IsNullOrEmpty(msiFile))
            {
                throw new InvalidOperationException("%CLI_MSI% must point to the msi that is to be tested");
            }

            _msiMgr = new MsiManager(msiFile);

            // make sure that the msi is not already installed, if so the machine is in a bad state
            Assert.False(_msiMgr.IsInstalled, "The dotnet CLI msi is already installed");

            _msiMgr.Install(InstallLocation);
            Assert.True(_msiMgr.IsInstalled);
        }