d9adc9214a
Cleaning up the Installer tests - rename project to conform to the rest of the tests - convert to .xproj - clean up unused usings
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using Microsoft.Win32;
|
|
using Xunit;
|
|
|
|
namespace Dotnet.Cli.Msi.Tests
|
|
{
|
|
public class PostUninstallTests : InstallFixture
|
|
{
|
|
private MsiManager _msiMgr;
|
|
|
|
public PostUninstallTests()
|
|
{
|
|
_msiMgr = base.MsiManager;
|
|
}
|
|
|
|
[Fact]
|
|
public void DotnetOnPathTest()
|
|
{
|
|
Assert.True(_msiMgr.IsInstalled);
|
|
|
|
_msiMgr.UnInstall();
|
|
|
|
Assert.False(_msiMgr.IsInstalled);
|
|
Assert.False(Utils.ExistsOnPath("dotnet.exe"), "After uninstallation dotnet tools must not be on path");
|
|
}
|
|
|
|
[Fact]
|
|
public void DotnetRegKeysTest()
|
|
{
|
|
Assert.True(_msiMgr.IsInstalled);
|
|
|
|
_msiMgr.UnInstall();
|
|
|
|
Assert.False(_msiMgr.IsInstalled);
|
|
|
|
var hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
|
|
Assert.Null(hklm.OpenSubKey(@"SOFTWARE\dotnet\Setup", false));
|
|
|
|
hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
|
|
Assert.Null(hklm.OpenSubKey(@"SOFTWARE\dotnet\Setup", false));
|
|
}
|
|
}
|
|
}
|