示例#1
0
        // 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
        // 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);
        }
        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
        // 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
        // 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);
        }