public void ConvertTo() { var xml = $"<s0:Properties xmlns:s0=\"{SchemaAnnotation.NAMESPACE}\" xmlns:s1=\"urn\">" + "<s1:Property1 xpath=\"*/some-node\" />" + "<s1:Property2 mode=\"promote\" xpath=\"*/other-node\" />" + "</s0:Properties>"; var sut = new PropertyExtractorCollectionConverter(); var extractorCollection = new PropertyExtractorCollection( new XPathExtractor(new XmlQualifiedName("Property1", "urn"), "*/some-node", ExtractionMode.Write), new XPathExtractor(new XmlQualifiedName("Property2", "urn"), "*/other-node", ExtractionMode.Promote)); sut.ConvertTo(extractorCollection, typeof(string)).Should().Be(xml); }
public void ConvertToNull() { var sut = new PropertyExtractorCollectionConverter(); sut.ConvertTo(new PropertyExtractorCollection(), typeof(string)).Should().BeNull(); }