public void TestCreateFolderIsInjectedInFoldersStoringOnlyShortcuts() { var parameters = new WixBuilderParameters { Features = new[] { new Feature { Id = "Documentation", Title = "Documentation", Description = "all the docs", Content = new Content { Include = @"Doc\*.*" }, Shortcuts = new[] { new Shortcut { Name = "Foo documentation", Path = @"Doc/foo.chm" } } }, }, KnownIds = new[] { new KnownId { Id = "foo_help", Path = @"Doc/foo.chm" }, } }; var wixDocument = WixDocumentFor(parameters); var targetMenuFolder = wixDocument.ResolveDirectoryRef("TargetMenuFolder"); foreach (var shortcut in targetMenuFolder.Shortcuts) { WixComponent component = shortcut.ParentElement.ToWix <WixComponent>(); Assert.AreEqual(0, component.Files.Count()); Assert.AreEqual(1, component.SelectNodes("wix:CreateFolder").Count); AssertPerUserProfileComponentUsesRegistryKeyAsPath(component); } }
private static void AssertPerUserProfileComponentUsesRegistryKeyAsPath(WixComponent component) { Assert.GreaterOrEqual(component.SelectNodes("wix:RegistryValue").Count, 1); }