Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Hunter <matthunt@mono-cvs.ximian.com>2002-09-21 08:21:44 +0400
committerMatt Hunter <matthunt@mono-cvs.ximian.com>2002-09-21 08:21:44 +0400
commitafcfff04a2d0f22f31af389e56d9c4eb2454f446 (patch)
treeb02ca844e2258fdcc5526beec06ee2c1c16e4f25 /mcs/class/System.XML/Test/XmlElementTests.cs
parent07aae53facdf9b4f8fe011bf0add6b7bda4560fe (diff)
implementing tests: XmlElementTests.TestSetAttributeNode
and XmlAttributeCollectionTest.TestAppend svn path=/trunk/mcs/; revision=7681
Diffstat (limited to 'mcs/class/System.XML/Test/XmlElementTests.cs')
-rw-r--r--mcs/class/System.XML/Test/XmlElementTests.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/XmlElementTests.cs b/mcs/class/System.XML/Test/XmlElementTests.cs
index f0dca5c613b..9b7390294e9 100644
--- a/mcs/class/System.XML/Test/XmlElementTests.cs
+++ b/mcs/class/System.XML/Test/XmlElementTests.cs
@@ -205,5 +205,15 @@ namespace MonoTests.System.Xml
xmlElement.RemoveAllAttributes ();
AssertEquals ("attributes not properly removed.", false, xmlElement.HasAttribute ("type"));
}
+
+ public void TestSetAttributeNode()
+ {
+ XmlDocument xmlDoc = new XmlDocument ();
+ XmlElement xmlEl = xmlDoc.CreateElement ("TestElement");
+ XmlAttribute xmlAttribute = xmlEl.SetAttributeNode ("attr1", "namespace1");
+ XmlAttribute xmlAttribute2 = xmlEl.SetAttributeNode ("attr2", "namespace2");
+ AssertEquals ("attribute name not properly created.", true, xmlAttribute.Name.Equals ("attr1"));
+ AssertEquals ("attribute namespace not properly created.", true, xmlAttribute.NamespaceURI.Equals ("namespace1"));
+ }
}
}