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<would>you&do this?</prop>"); }
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}>"); }