public void SetUpFixture()
		{
			SD.InitializeForUnitTests();
			WixBindingTestsHelper.InitMSBuildEngine();
			
			// create the project.
			ProjectCreateInformation info = new ProjectCreateInformation(MockSolution.Create(), new FileName(@"C:\Projects\Test\Test.wixproj"));

			wixProject = new WixProjectWithOverriddenSave(info);
			
			// Add wix extensionitem.
			wixExtensionItem = new WixExtensionProjectItem(wixProject);
			wixExtensionItem.Include = @"..\..\first.dll";
			ProjectService.AddProjectItem(wixProject, wixExtensionItem);
			
			// Run Initialize on the WixExtensionFolderNode, which is 
			// equivalent to expanding the node, so it adds it children. Cannot
			// call ExtTreeNode.Expanding since this relies on the tree node
			// being visible.
			WixExtensionFolderNodeTester nodeTester = new WixExtensionFolderNodeTester(wixProject);
			nodeTester.RunInitialize();
			
			wixExtensionFolderNode = (WixExtensionFolderNode)nodeTester;
			wixExtensionNode = (WixExtensionNode)wixExtensionFolderNode.Nodes[0];
		}
		public void SetUpFixture()
		{
			wixProject = WixBindingTestsHelper.CreateEmptyWixProject();
			
			// Add wix Extension item.
			firstWixExtensionItem = new WixExtensionProjectItem(wixProject);
			firstWixExtensionItem.Include = @"..\..\first-ext.dll";
			ProjectService.AddProjectItem(wixProject, firstWixExtensionItem);
			
			// Add another wix Extension item.
			secondWixExtensionItem = new WixExtensionProjectItem(wixProject);
			secondWixExtensionItem.Include = @"..\..\second-ext.dll";
			ProjectService.AddProjectItem(wixProject, secondWixExtensionItem);

			// Run Initialize on the WixExtensionFolderNode, which is 
			// equivalent to expanding the node, so it adds it children. Cannot
			// call ExtTreeNode.Expanding since this relies on the tree node
			// being visible.
			WixExtensionFolderNodeTester nodeTester = new WixExtensionFolderNodeTester(wixProject);
			nodeTester.RunInitialize();
			
			wixExtensionFolderNode = (WixExtensionFolderNode)nodeTester;
			if (wixExtensionFolderNode.Nodes.Count > 1) {
				firstWixExtensionNode = (WixExtensionNode)wixExtensionFolderNode.Nodes[0];
				secondWixExtensionNode = (WixExtensionNode)wixExtensionFolderNode.Nodes[1];
			}
		}
		void AddExtensionNodes()
		{
			Nodes.Clear();

			foreach (ProjectItem item in project.Items) {
				WixExtensionProjectItem extensionItem = item as WixExtensionProjectItem;
				if (extensionItem != null) {
					WixExtensionNode node = new WixExtensionNode(extensionItem);
					node.AddTo(this);
				}
			}
		}
Ejemplo n.º 4
0
        void AddExtensionNodes()
        {
            Nodes.Clear();

            foreach (ProjectItem item in project.Items)
            {
                WixExtensionProjectItem extensionItem = item as WixExtensionProjectItem;
                if (extensionItem != null)
                {
                    WixExtensionNode node = new WixExtensionNode(extensionItem);
                    node.AddTo(this);
                }
            }
        }