2003-03-02 Sebastien Pouliot <spouliot@videotron.ca>
authorSebastien Pouliot <sebastien@ximian.com>
Sun, 2 Mar 2003 16:12:33 +0000 (16:12 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Sun, 2 Mar 2003 16:12:33 +0000 (16:12 -0000)
* KeyInfoNameTest.cs: Better naming.
* KeyInfoRetrievalMethodTest.cs: Splitted a test.

svn path=/trunk/mcs/; revision=12101

mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog
mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoNameTest.cs
mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoRetrievalMethodTest.cs

index e0d95cb223e50cfb4c4cb74307c6bc7debf09eec..ea8ccec6825bde45d71bc1e35e17721d3223cb19 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-02  Sebastien Pouliot  <spouliot@videotron.ca>
+
+       * KeyInfoNameTest.cs: Better naming.
+       * KeyInfoRetrievalMethodTest.cs: Splitted a test.
+
 2003-02-19  Sebastien Pouliot  <spouliot@videotron.ca>
 
        * All: Updated tests for NUnit2. Some big tests where splited in 
index 0a7b0d926a97fb2b62cb020bf5ed34591e76ac8c..558c210d72b044d844fcbccdac3b90ee6e9b1f5b 100644 (file)
@@ -30,8 +30,8 @@ namespace MonoTests.System.Security.Cryptography.Xml {
                        KeyInfoName name2 = new KeyInfoName ();
                        name2.LoadXml (xel);
 
-                       Assertion.AssertEquals ("name1==name2", (name1.GetXml ().OuterXml), (name2.GetXml ().OuterXml));
                        Assertion.AssertEquals ("newKeyValue==value", newKeyValue, name1.Value);
+                       Assertion.AssertEquals ("name1==name2", (name1.GetXml ().OuterXml), (name2.GetXml ().OuterXml));
                }
 
                [Test]
@@ -41,11 +41,10 @@ namespace MonoTests.System.Security.Cryptography.Xml {
                        XmlDocument doc = new XmlDocument ();
                        doc.LoadXml (value);
 
-                       KeyInfoName name1 = new KeyInfoName ();
-                       name1.LoadXml (doc.DocumentElement);
-
-                       string s = (name1.GetXml ().OuterXml);
-                       Assertion.AssertEquals ("Name", value, s);
+                       KeyInfoName name = new KeyInfoName ();
+                       name.LoadXml (doc.DocumentElement);
+                       Assertion.AssertEquals ("import.Name", "Mono::", name.Value);
+                       Assertion.AssertEquals ("import.GetXml", value, name.GetXml ().OuterXml);
                }
 
                [Test]
@@ -56,8 +55,8 @@ namespace MonoTests.System.Security.Cryptography.Xml {
                        XmlDocument doc = new XmlDocument ();
                        doc.LoadXml (bad);
 
-                       KeyInfoName name1 = new KeyInfoName ();
-                       name1.LoadXml (null);
+                       KeyInfoName name = new KeyInfoName ();
+                       name.LoadXml (null);
                }
 
                [Test]
@@ -67,9 +66,10 @@ namespace MonoTests.System.Security.Cryptography.Xml {
                        XmlDocument doc = new XmlDocument ();
                        doc.LoadXml (bad);
 
-                       KeyInfoName name1 = new KeyInfoName ();
-                       name1.LoadXml (doc.DocumentElement);
-                       Assertion.AssertEquals("invalid", "<KeyName xmlns=\"http://www.w3.org/2000/09/xmldsig#\"></KeyName>", (name1.GetXml ().OuterXml));
+                       KeyInfoName name = new KeyInfoName ();
+                       name.LoadXml (doc.DocumentElement);
+                       Assertion.AssertEquals ("invalid.Name", "", name.Value);
+                       Assertion.AssertEquals ("invalid.GetXml", "<KeyName xmlns=\"http://www.w3.org/2000/09/xmldsig#\"></KeyName>", (name.GetXml ().OuterXml));
                }
        }
 }
\ No newline at end of file
index b3ca3993c61c8185fd6ee6a230c8af6865b3ee85..a5adfb6736d9f5a5d71cfc6a1bac1bc84e746430 100644 (file)
@@ -20,14 +20,17 @@ namespace MonoTests.System.Security.Cryptography.Xml {
        public class KeyInfoRetrievalMethodTest {
 
                [Test]
-               public void TestNewKeyNode () 
+               public void TestNewEmptyKeyNode () 
                {
-                       string uri = "http://www.go-mono.com/";
                        KeyInfoRetrievalMethod uri1 = new KeyInfoRetrievalMethod ();
-
-                       // verify empty XML
                        Assertion.AssertEquals ("Empty", "<RetrievalElement xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />", (uri1.GetXml ().OuterXml));
+               }
 
+               [Test]
+               public void TestNewKeyNode () 
+               {
+                       string uri = "http://www.go-mono.com/";
+                       KeyInfoRetrievalMethod uri1 = new KeyInfoRetrievalMethod ();
                        uri1.Uri = uri;
                        XmlElement xel = uri1.GetXml ();