diff options
author | Matt Hunter <matthunt@mono-cvs.ximian.com> | 2002-09-21 08:21:44 +0400 |
---|---|---|
committer | Matt Hunter <matthunt@mono-cvs.ximian.com> | 2002-09-21 08:21:44 +0400 |
commit | afcfff04a2d0f22f31af389e56d9c4eb2454f446 (patch) | |
tree | b02ca844e2258fdcc5526beec06ee2c1c16e4f25 /mcs/class/System.XML/Test/XmlElementTests.cs | |
parent | 07aae53facdf9b4f8fe011bf0add6b7bda4560fe (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.cs | 10 |
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"));
+ } } } |