public void SetUpFixture()
		{
			WixBindingTestsHelper.InitMSBuildEngine();
			
			// create the project.
			ProjectCreateInformation info = new ProjectCreateInformation();
			info.Solution = new Solution();
			info.ProjectName = "Test";
			info.OutputProjectFileName = @"C:\Projects\Test\Test.wixproj";

			wixProject = new WixProjectWithOverriddenSave(info);
			
			// Add wix library item.
			wixLibraryItem = new WixLibraryProjectItem(wixProject);
			wixLibraryItem.Include = @"..\..\first.wixlib";
			ProjectService.AddProjectItem(wixProject, wixLibraryItem);
			
			// Run Initialize on the WixLibraryFolderNode, 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.
			WixLibraryFolderNodeTester nodeTester = new WixLibraryFolderNodeTester(wixProject);
			nodeTester.RunInitialize();
			
			wixLibraryFolderNode = (WixLibraryFolderNode)nodeTester;
			wixLibraryNode = (WixLibraryNode)wixLibraryFolderNode.Nodes[0];
		}
		public void SetUpFixture()
		{
			SD.InitializeForUnitTests();
			wixProject = WixBindingTestsHelper.CreateEmptyWixProject();
			
			// Add wix library item.
			firstWixLibraryItem = new WixLibraryProjectItem(wixProject);
			firstWixLibraryItem.Include = @"..\..\first.wixlib";
			ProjectService.AddProjectItem(wixProject, firstWixLibraryItem);
			
			// Add another wix library item.
			secondWixLibraryItem = new WixLibraryProjectItem(wixProject);
			secondWixLibraryItem.Include = @"..\..\second.wixlib";
			ProjectService.AddProjectItem(wixProject, secondWixLibraryItem);

			// Run Initialize on the WixLibraryFolderNode, 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.
			WixLibraryFolderNodeTester nodeTester = new WixLibraryFolderNodeTester(wixProject);
			nodeTester.RunInitialize();
			
			wixLibraryFolderNode = (WixLibraryFolderNode)nodeTester;
			firstWixLibraryNode = (WixLibraryNode)wixLibraryFolderNode.Nodes[0];
			secondWixLibraryNode = (WixLibraryNode)wixLibraryFolderNode.Nodes[1];
		}
		void AddLibraryNodes()
		{
			Nodes.Clear();

			foreach (ProjectItem item in project.Items) {
				WixLibraryProjectItem wixLibraryItem = item as WixLibraryProjectItem;
				if (wixLibraryItem != null) {
					WixLibraryNode node = new WixLibraryNode(wixLibraryItem);
					node.AddTo(this);
				}
			}
		}
Example #4
0
        void AddLibraryNodes()
        {
            Nodes.Clear();

            foreach (ProjectItem item in project.Items)
            {
                WixLibraryProjectItem wixLibraryItem = item as WixLibraryProjectItem;
                if (wixLibraryItem != null)
                {
                    WixLibraryNode node = new WixLibraryNode(wixLibraryItem);
                    node.AddTo(this);
                }
            }
        }