public void PropertiesCloned()
        {
            IProject p = WixBindingTestsHelper.CreateEmptyWixProject();
            WixLibraryProjectItem item = new WixLibraryProjectItem(p);

            item.Include = "test.wixlib";
            item.SetEvaluatedMetadata("PropertyName", "PropertyValue");

            ProjectItem clone = item.Clone();

            item.Include = "changed.wixlib";

            item.RemoveMetadata("PropertyName");

            Assert.AreEqual("PropertyValue", clone.GetEvaluatedMetadata("PropertyName", "DefaultValue"));
        }
Ejemplo n.º 2
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);
        }