diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2007-01-12 15:22:39 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2007-01-12 15:22:39 +0300 |
commit | c74b0f26b945a93b7490bd9f7dd2b892bc84fb05 (patch) | |
tree | d1a99a3b3157f40d18b923b21bc1dc960829f34c /mcs/class/System.Security/Test | |
parent | c5cf7ba16e042ccfc73d4ab149f063afdc2658df (diff) |
2007-01-12 Atsushi Enomoto <atsushi@ximian.com>
* DataObject.cs : don't clear attributes or children unnecessarily.
* DataObjectTest.cs : test to make sure to not clear attributes or
children unnecessarily.
svn path=/trunk/mcs/; revision=70916
Diffstat (limited to 'mcs/class/System.Security/Test')
-rw-r--r-- | mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataObjectTest.cs | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog index 899e870224b..ba124e8a45f 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog @@ -1,5 +1,10 @@ 2007-01-12 Atsushi Enomoto <atsushi@ximian.com> + * DataObjectTest.cs : test to make sure to not clear attributes or + children unnecessarily. + +2007-01-12 Atsushi Enomoto <atsushi@ximian.com> + * SignedXmlTest.cs : fixed ComputeSignatureNoSigningKey() to not expect silly exception. Added test for malformed reference. diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataObjectTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataObjectTest.cs index 612328c12fc..27c1cd7b84c 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataObjectTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataObjectTest.cs @@ -169,5 +169,24 @@ namespace MonoTests.System.Security.Cryptography.Xml { AssertEquals (String.Empty, el1.OwnerDocument.OuterXml); */ } + + [Test] + public void SetDataAfterId () + { + DataObject d = new DataObject (); + XmlElement el = new XmlDocument ().CreateElement ("foo"); + d.Id = "id:1"; + d.Data = el.SelectNodes ("."); + AssertEquals ("id:1", d.Id); + } + + [Test] + public void SetMimeTypeAfterId () + { + XmlElement el = new XmlDocument ().CreateElement ("foo"); + DataObject d = new DataObject ("id:1", null, null, el); + d.MimeType = "text/html"; + AssertEquals ("id:1", d.Id); + } } } |