mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
33 lines
709 B
C#
33 lines
709 B
C#
//
|
|
// System.Xml.XmlEntityReference.cs
|
|
//
|
|
// Authors:
|
|
// Atsushi Enomoto <[email protected]>
|
|
// Martin Willemoes Hansen <[email protected]>
|
|
//
|
|
// (C) 2002 Atsushi Enomoto
|
|
// (C) 2003 Martin Willemoes Hansen
|
|
//
|
|
|
|
using System;
|
|
using System.Xml;
|
|
using NUnit.Framework;
|
|
|
|
namespace MonoTests.System.Xml
|
|
{
|
|
[TestFixture]
|
|
public class XmlEntityReferenceTests : Assertion
|
|
{
|
|
[Test]
|
|
public void WriteTo ()
|
|
{
|
|
XmlDocument doc = new XmlDocument();
|
|
doc.LoadXml("<root/>");
|
|
XmlEntityReference er = doc.CreateEntityReference("foo");
|
|
doc.DocumentElement.AppendChild(er);
|
|
AssertEquals ("Name", "foo", er.Name);
|
|
AssertEquals ("WriteTo", "<root>&foo;</root>", doc.DocumentElement.OuterXml);
|
|
}
|
|
}
|
|
}
|