diff options
Diffstat (limited to 'mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataObjectTest.cs')
-rw-r--r-- | mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataObjectTest.cs | 38 |
1 files changed, 19 insertions, 19 deletions
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 27c1cd7b84c..e1bd2cebbd4 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 @@ -19,7 +19,7 @@ using NUnit.Framework; namespace MonoTests.System.Security.Cryptography.Xml { [TestFixture] - public class DataObjectTest : Assertion { + public class DataObjectTest { [Test] public void NewDataObject () @@ -29,25 +29,25 @@ namespace MonoTests.System.Security.Cryptography.Xml { doc.LoadXml (test); DataObject obj1 = new DataObject (); - Assert ("Data.Count==0", (obj1.Data.Count == 0)); - AssertEquals ("Just constructed", "<Object xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />", (obj1.GetXml ().OuterXml)); + Assert.IsTrue ((obj1.Data.Count == 0), "Data.Count==0"); + Assert.AreEqual ("<Object xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />", (obj1.GetXml ().OuterXml), "Just constructed"); obj1.Id = "id"; obj1.MimeType = "mime"; obj1.Encoding = "encoding"; - AssertEquals ("Only attributes", "<Object Id=\"id\" MimeType=\"mime\" Encoding=\"encoding\" xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />", (obj1.GetXml ().OuterXml)); + Assert.AreEqual ("<Object Id=\"id\" MimeType=\"mime\" Encoding=\"encoding\" xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />", (obj1.GetXml ().OuterXml), "Only attributes"); obj1.Data = doc.ChildNodes; - Assert ("Data.Count==1", (obj1.Data.Count == 1)); + Assert.IsTrue ((obj1.Data.Count == 1), "Data.Count==1"); XmlElement xel = obj1.GetXml (); DataObject obj2 = new DataObject (); obj2.LoadXml (xel); - AssertEquals ("obj1==obj2", (obj1.GetXml ().OuterXml), (obj2.GetXml ().OuterXml)); + Assert.AreEqual ((obj1.GetXml ().OuterXml), (obj2.GetXml ().OuterXml), "obj1==obj2"); DataObject obj3 = new DataObject (obj1.Id, obj1.MimeType, obj1.Encoding, doc.DocumentElement); - AssertEquals ("obj2==obj3", (obj2.GetXml ().OuterXml), (obj3.GetXml ().OuterXml)); + Assert.AreEqual ((obj2.GetXml ().OuterXml), (obj3.GetXml ().OuterXml), "obj2==obj3"); } [Test] @@ -59,10 +59,10 @@ namespace MonoTests.System.Security.Cryptography.Xml { DataObject obj1 = new DataObject (); obj1.LoadXml (doc.DocumentElement); - Assert ("Data.Count==2", (obj1.Data.Count == 2)); + Assert.IsTrue ((obj1.Data.Count == 2), "Data.Count==2"); string s = (obj1.GetXml ().OuterXml); - AssertEquals ("DataObject 1", value1, s); + Assert.AreEqual (value1, s, "DataObject 1"); string value2 = "<Object xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><Test xmlns=\"\" /></Object>"; doc = new XmlDocument (); @@ -72,7 +72,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { obj2.LoadXml (doc.DocumentElement); s = (obj2.GetXml ().OuterXml); - AssertEquals ("DataObject 2", value2, s); + Assert.AreEqual (value2, s, "DataObject 2"); string value3 = "<Object Id=\"id\" xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><Test xmlns=\"\" /></Object>"; doc = new XmlDocument (); @@ -82,7 +82,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { obj3.LoadXml (doc.DocumentElement); s = (obj3.GetXml ().OuterXml); - AssertEquals ("DataObject 3", value3, s); + Assert.AreEqual (value3, s, "DataObject 3"); string value4 = "<Object MimeType=\"mime\" xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><Test xmlns=\"\" /></Object>"; doc = new XmlDocument (); @@ -92,7 +92,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { obj4.LoadXml (doc.DocumentElement); s = (obj4.GetXml ().OuterXml); - AssertEquals ("DataObject 4", value4, s); + Assert.AreEqual (value4, s, "DataObject 4"); } [Test] @@ -122,7 +122,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { doc.LoadXml (value); obj1.LoadXml (doc.DocumentElement); string s = (obj1.GetXml ().OuterXml); - AssertEquals ("DataObject Bad", value, s); + Assert.AreEqual (value, s, "DataObject Bad"); } [Test] @@ -135,7 +135,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { obj.LoadXml (doc.DocumentElement); // obj.Id = "hogehoge"; XmlElement el2 = obj.GetXml (); - AssertEquals ("Document is kept unless setting properties", doc, el2.OwnerDocument); + Assert.AreEqual (doc, el2.OwnerDocument, "Document is kept unless setting properties"); } [Test] @@ -148,7 +148,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { obj.LoadXml (doc.DocumentElement); obj.Id = "hogehoge"; XmlElement el2 = obj.GetXml (); - Assert ("Document is not kept when properties are set", doc != el2.OwnerDocument); + Assert.IsTrue (doc != el2.OwnerDocument, "Document is not kept when properties are set"); } [Test] @@ -162,11 +162,11 @@ namespace MonoTests.System.Security.Cryptography.Xml { obj.MimeType = "application/octet-stream"; obj.Encoding = "euc-kr"; XmlElement el1 = obj.GetXml (); - AssertEquals ("<Object Id=\"hoge\" MimeType=\"application/octet-stream\" Encoding=\"euc-kr\" xmlns=\"http://www.w3.org/2000/09/xmldsig#\">test</Object>", el1.OuterXml); + Assert.AreEqual ("<Object Id=\"hoge\" MimeType=\"application/octet-stream\" Encoding=\"euc-kr\" xmlns=\"http://www.w3.org/2000/09/xmldsig#\">test</Object>", el1.OuterXml); /* looks curious? but the element does not look to be appended to the document. Just commented out since it is not fixed. - AssertEquals (String.Empty, el1.OwnerDocument.OuterXml); + Assert.AreEqual (String.Empty, el1.OwnerDocument.OuterXml); */ } @@ -177,7 +177,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { XmlElement el = new XmlDocument ().CreateElement ("foo"); d.Id = "id:1"; d.Data = el.SelectNodes ("."); - AssertEquals ("id:1", d.Id); + Assert.AreEqual ("id:1", d.Id); } [Test] @@ -186,7 +186,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { XmlElement el = new XmlDocument ().CreateElement ("foo"); DataObject d = new DataObject ("id:1", null, null, el); d.MimeType = "text/html"; - AssertEquals ("id:1", d.Id); + Assert.AreEqual ("id:1", d.Id); } } } |