diff options
Diffstat (limited to 'src/test/burn/WixTestTools/BundleVerifier.cs')
-rw-r--r-- | src/test/burn/WixTestTools/BundleVerifier.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/burn/WixTestTools/BundleVerifier.cs b/src/test/burn/WixTestTools/BundleVerifier.cs index db14c228..e0edb081 100644 --- a/src/test/burn/WixTestTools/BundleVerifier.cs +++ b/src/test/burn/WixTestTools/BundleVerifier.cs | |||
@@ -14,6 +14,7 @@ namespace WixTestTools | |||
14 | 14 | ||
15 | public partial class BundleInstaller | 15 | public partial class BundleInstaller |
16 | { | 16 | { |
17 | public const string DependencyRegistryRoot = "Software\\Classes\\Installer\\Dependencies"; | ||
17 | public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; | 18 | public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; |
18 | public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; | 19 | public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; |
19 | 20 | ||
@@ -134,6 +135,22 @@ namespace WixTestTools | |||
134 | Assert.Equal(cached, Directory.Exists(cachePath)); | 135 | Assert.Equal(cached, Directory.Exists(cachePath)); |
135 | } | 136 | } |
136 | 137 | ||
138 | public void VerifyPackageProviderRemoved(string packageId) | ||
139 | { | ||
140 | using var wixOutput = WixOutput.Read(this.BundlePdb); | ||
141 | var intermediate = Intermediate.Load(wixOutput); | ||
142 | var section = intermediate.Sections.Single(); | ||
143 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | ||
144 | var providerSymbol = section.Symbols.OfType<WixDependencyProviderSymbol>().Single(p => p.ParentRef == packageId); | ||
145 | var registryRoot = packageSymbol.PerMachine == YesNoDefaultType.Yes ? Registry.LocalMachine : Registry.CurrentUser; | ||
146 | var subkeyPath = Path.Combine(DependencyRegistryRoot, providerSymbol.ProviderKey); | ||
147 | using var registryKey = registryRoot.OpenSubKey(subkeyPath); | ||
148 | if (registryKey != null) | ||
149 | { | ||
150 | WixAssert.StringEqual(null, subkeyPath); | ||
151 | } | ||
152 | } | ||
153 | |||
137 | public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false) | 154 | public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false) |
138 | { | 155 | { |
139 | using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name); | 156 | using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name); |