public void ValueWithXmlChars_Seralizes()
        {
            // Arrange
            var prop = new ChannelProperty("prop", "why<would>you&do this?");

            // Act
            var result = prop.ToXElement();

            // Assert
            result.ToString(SaveOptions.DisableFormatting).Should().Be("<prop>why&lt;would&gt;you&amp;do this?</prop>");
        }
Пример #2
0
 protected static void AssertChannelProp(ChannelProperty channelProp, string name, string value)
 {
     channelProp.Name.Should().Be(name);
     channelProp.Value.Should().Be(value);
     channelProp.ToXElement().ToString(SaveOptions.DisableFormatting).Should().Be($"<{name}>{value}</{name}>");
 }