Exemple #1
0
        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 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()
        {
            SD.InitializeForUnitTests();
            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];
            }
        }
        public void NewWixExtensionProjectItem()
        {
            IProject p = WixBindingTestsHelper.CreateEmptyWixProject();
            WixExtensionProjectItem item = new WixExtensionProjectItem(p);

            Assert.AreEqual(WixItemType.Extension, item.ItemType);
        }
        public void SetUpFixture()
        {
            WixProject p = WixBindingTestsHelper.CreateEmptyWixProject();

            WixExtensionProjectItem compilerItem = new WixExtensionProjectItem(p);

            compilerItem.Include = @"$(WixToolPath)\WixNetFxExtension.dll";
            ProjectService.AddProjectItem(p, compilerItem);

            extensionItem = p.WixExtensions[0];
        }
Exemple #5
0
        public void SetUpFixture()
        {
            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);

            // Add a wix extension item.
            firstWixExtensionItem         = new WixExtensionProjectItem(wixProject);
            firstWixExtensionItem.Include = "first-ext.dll";
            ProjectService.AddProjectItem(wixProject, firstWixExtensionItem);

            wixLibraryFolderNode   = new WixLibraryFolderNode(wixProject);
            wixExtensionFolderNode = new WixExtensionFolderNode(wixProject);
        }