コード例 #1
0
		public void CloneIsNotNull()
		{
			IProject p = WixBindingTestsHelper.CreateEmptyWixProject();
			WixLibraryProjectItem item = new WixLibraryProjectItem(p);
			item.Include = "test.wixlib";
			
			Assert.IsNotNull(item.Clone());
		}
コード例 #2
0
		public void IsCloneNotSameObject()
		{
			IProject p = WixBindingTestsHelper.CreateEmptyWixProject();
			WixLibraryProjectItem item = new WixLibraryProjectItem(p);
			item.Include = "test.wixlib";
			
			ProjectItem clone = item.Clone();
			item.Include = "changed.wixlib";
			
			Assert.AreEqual("test.wixlib", clone.Include);
		}
コード例 #3
0
		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"));
		}