public void Setup() { MemoryStream ms = new MemoryStream(); XmlDocument doc = new XmlDocument(); doc.Load(new StringReader("<Customer><Name>Chris</Name></Customer>")); XmlWriter writer = XmlWriter.Create(ms); doc.WriteTo(writer); writer.Flush(); ms.Position = 0; inputStream = ms; attr = new XmlBindAttribute(); }
public void Setup() { MemoryStream ms = new MemoryStream(); var doc = new XDocument( new XElement("Customer", new XElement("Name", "Chris"))); var writer = XmlWriter.Create(ms); doc.WriteTo(writer); writer.Flush(); ms.Position = 0; inputStream = ms; attr = new XmlBindAttribute(); }