Ejemplo n.º 1
0
        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}\" />");
        }
Ejemplo n.º 2
0
        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)));
        }