public void SerializeDummyMicroPipelineComponentWithCustomXmlSerialization() { var component = new DummyMicroPipelineComponentWithCustomXmlSerialization(); var builder = new StringBuilder(); using (var writer = XmlWriter.Create(builder, new XmlWriterSettings { OmitXmlDeclaration = true })) { component.Serialize(writer); } builder.ToString().Should().Be($"<mComponent name=\"{component.GetType().AssemblyQualifiedName}\" />"); }
public void SerializeDummyMicroPipelineComponentWithCustomXmlSerialization() { var component = new DummyMicroPipelineComponentWithCustomXmlSerialization(); var builder = new StringBuilder(); using (var writer = XmlWriter.Create(builder, new XmlWriterSettings { OmitXmlDeclaration = true })) { component.Serialize(writer); } Assert.That( builder.ToString(), Is.EqualTo(string.Format("<mComponent name=\"{0}\" />", component.GetType().AssemblyQualifiedName))); }