public void GetXmlStringTest(string name, string value, bool escapeValue, string excpectedString) { XmlAttribute attribute = new XmlAttribute(name); attribute.SetContent(value, escapeValue); StringBuilder sb = new StringBuilder(); attribute.AppendXmlString(sb); Assert.That(sb.ToString(), Is.EqualTo(excpectedString)); }