public void CopyMetadataToDoesNotCopyExtension() { TaskItem from = new TaskItem("myfile.txt"); TaskItem to = new TaskItem("myfile.bin"); from.CopyMetadataTo(to); Assertion.AssertEquals(".bin", to.GetMetadata("Extension")); }
public void SimpleCopyMetadataTo() { TaskItem from = new TaskItem("myfile.txt"); from.SetMetadata("Culture", "fr"); TaskItem to = new TaskItem("myfile.bin"); from.CopyMetadataTo(to); Assertion.AssertEquals("fr", to.GetMetadata("Culture")); }
public void CopyMetadataToWithDefaults() { BuildItem fromBuildItem = BuildItem_Tests.GetXmlBackedItemWithDefinitionLibrary(); // i1; has m=m1 (default) and n=n1 (regular) TaskItem from = new TaskItem(fromBuildItem); TaskItem to = new TaskItem("i2"); from.CopyMetadataTo(to); Assertion.AssertEquals("n1", to.GetMetadata("n")); Assertion.AssertEquals("m1", to.GetMetadata("m")); }