Author: spouliot
Date: 2005-04-26 14:54:47 -0400 (Tue, 26 Apr 2005)
New Revision: 43616

Modified:
   
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs
   
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ChangeLog
   
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs
Log:
2005-04-26  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * AlgorithmIdentifierTest.cs: Complete some test cases. Updated to 
        NUnit 2.2 API.
        * SignedCmsTest.cs: Added [Ignore] to 3 tests that now also fails
        on beta2.



Modified: 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs
===================================================================
--- 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs
   2005-04-26 18:52:43 UTC (rev 43615)
+++ 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs
   2005-04-26 18:54:47 UTC (rev 43616)
@@ -38,7 +38,7 @@
 namespace MonoTests.System.Security.Cryptography.Pkcs {
 
        [TestFixture]
-       public class AlgorithmIdentifierTest : Assertion {
+       public class AlgorithmIdentifierTest {
 
                static string defaultOid = "1.2.840.113549.3.7";
                static string defaultName = "3des";
@@ -48,10 +48,10 @@
                public void ConstructorEmpty () 
                {
                        AlgorithmIdentifier ai = new AlgorithmIdentifier ();
-                       AssertEquals ("KeyLength", 0, ai.KeyLength);
-                       AssertEquals ("Oid.FriendlyName", defaultName, 
ai.Oid.FriendlyName);
-                       AssertEquals ("Oid.Value", defaultOid, ai.Oid.Value);
-                       AssertEquals ("Parameters", 0, ai.Parameters.Length);
+                       Assert.AreEqual (0, ai.KeyLength, "KeyLength");
+                       Assert.AreEqual (defaultName, ai.Oid.FriendlyName, 
"Oid.FriendlyName");
+                       Assert.AreEqual (defaultOid, ai.Oid.Value, "Oid.Value");
+                       Assert.AreEqual (0, ai.Parameters.Length, "Parameters");
                }
 
                [Test]
@@ -59,9 +59,9 @@
                {
                        Oid o = new Oid (validOid);
                        AlgorithmIdentifier ai = new AlgorithmIdentifier (o);
-                       AssertEquals ("KeyLength", 0, ai.KeyLength);
-                       AssertEquals ("Oid", validOid, ai.Oid.Value);
-                       AssertEquals ("Parameters", 0, ai.Parameters.Length);
+                       Assert.AreEqual (0, ai.KeyLength, "KeyLength");
+                       Assert.AreEqual (validOid, ai.Oid.Value, "Oid");
+                       Assert.AreEqual (0, ai.Parameters.Length, "Parameters");
                }
 
                [Test]
@@ -69,6 +69,9 @@
                public void ConstructorOidNull () 
                {
                        AlgorithmIdentifier ai = new AlgorithmIdentifier (null);
+                       Assert.IsNull (ai.Oid, "Oid");
+                       Assert.AreEqual (0, ai.KeyLength, "KeyLength");
+                       Assert.AreEqual (0, ai.Parameters.Length, "Parameters");
                }
 
                [Test]
@@ -76,9 +79,9 @@
                {
                        Oid o = new Oid (validOid);
                        AlgorithmIdentifier ai = new AlgorithmIdentifier (o, 
128);
-                       AssertEquals ("KeyLength", 128, ai.KeyLength);
-                       AssertEquals ("Oid", validOid, ai.Oid.Value);
-                       AssertEquals ("Parameters", 0, ai.Parameters.Length);
+                       Assert.AreEqual (128, ai.KeyLength, "KeyLength");
+                       Assert.AreEqual (validOid, ai.Oid.Value, "Oid");
+                       Assert.AreEqual (0, ai.Parameters.Length, "Parameters");
                }
 
                [Test]
@@ -86,6 +89,9 @@
                public void ConstructorOidNullKeyLength () 
                {
                        AlgorithmIdentifier ai = new AlgorithmIdentifier (null, 
128);
+                       Assert.IsNull (ai.Oid, "Oid");
+                       Assert.AreEqual (128, ai.KeyLength, "KeyLength");
+                       Assert.AreEqual (0, ai.Parameters.Length, "Parameters");
                }
 
                [Test]
@@ -94,6 +100,9 @@
                {
                        Oid o = new Oid (validOid);
                        AlgorithmIdentifier ai = new AlgorithmIdentifier (o, 
-1);
+                       Assert.AreEqual (-1, ai.KeyLength, "KeyLength");
+                       Assert.AreEqual (validOid, ai.Oid.Value, "Oid");
+                       Assert.AreEqual (0, ai.Parameters.Length, "Parameters");
                }
 
                [Test]
@@ -101,11 +110,11 @@
                {
                        AlgorithmIdentifier ai = new AlgorithmIdentifier ();
                        ai.KeyLength = Int32.MaxValue;
-                       AssertEquals ("KeyLength-Max", Int32.MaxValue, 
ai.KeyLength);
+                       Assert.AreEqual (Int32.MaxValue, ai.KeyLength, 
"KeyLength-Max");
                        ai.KeyLength = 0;
-                       AssertEquals ("KeyLength-Zero", 0, ai.KeyLength);
+                       Assert.AreEqual (0, ai.KeyLength, "KeyLength-Zero");
                        ai.KeyLength = Int32.MinValue;
-                       AssertEquals ("KeyLength-Min", Int32.MinValue, 
ai.KeyLength);
+                       Assert.AreEqual (Int32.MinValue, ai.KeyLength, 
"KeyLength-Min");
                }
 
                [Test]
@@ -113,9 +122,9 @@
                {
                        AlgorithmIdentifier ai = new AlgorithmIdentifier ();
                        ai.Oid = new Oid (validOid);
-                       AssertEquals ("Oid", validOid, ai.Oid.Value);
+                       Assert.AreEqual (validOid, ai.Oid.Value, "Oid");
                        ai.Oid = null;
-                       AssertNull ("Oid", ai.Oid);
+                       Assert.IsNull (ai.Oid, "Oid-Null");
                }
 
                [Test]
@@ -123,9 +132,9 @@
                {
                        AlgorithmIdentifier ai = new AlgorithmIdentifier ();
                        ai.Parameters = new byte[2] { 0x05, 0x00 }; // ASN.1 
NULL
-                       AssertEquals ("Oid", "05-00", BitConverter.ToString 
(ai.Parameters));
+                       Assert.AreEqual ("05-00", BitConverter.ToString 
(ai.Parameters), "Parameters");
                        ai.Parameters = null;
-                       AssertNull ("Parameters", ai.Parameters);
+                       Assert.IsNull (ai.Parameters, "Parameters-Null");
                }
        }
 }

Modified: 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ChangeLog
===================================================================
--- 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ChangeLog
    2005-04-26 18:52:43 UTC (rev 43615)
+++ 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ChangeLog
    2005-04-26 18:54:47 UTC (rev 43616)
@@ -1,3 +1,10 @@
+2005-04-26  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * AlgorithmIdentifierTest.cs: Complete some test cases. Updated to 
+       NUnit 2.2 API.
+       * SignedCmsTest.cs: Added [Ignore] to 3 tests that now also fails
+       on beta2.
+
 2005-04-23  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * CmsRecipientTest.cs, CmsSignerTest.cs, EnvelopedCmsTest.cs,

Modified: 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs
===================================================================
--- 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs
     2005-04-26 18:52:43 UTC (rev 43615)
+++ 
trunk/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs
     2005-04-26 18:54:47 UTC (rev 43616)
@@ -5,7 +5,7 @@
 //     Sebastien Pouliot  <[EMAIL PROTECTED]>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -299,6 +299,7 @@
                }
 
                [Test]
+               [Ignore ("now broken everywhere")]
                public void ComputeSignatureCmsSignerIssuerAndSerialNumber () 
                {
                        ContentInfo ci = new ContentInfo (asnNull);
@@ -320,6 +321,7 @@
                }
 
                [Test]
+               [Ignore ("now broken everywhere")]
                public void ComputeSignatureCmsSignerSubjectKeyIdentifier () 
                {
                        ContentInfo ci = new ContentInfo (asnNull);
@@ -341,6 +343,7 @@
                }
 
                [Test]
+               [Ignore ("now broken everywhere")]
                public void ComputeSignatureCmsSignerUnknown () 
                {
                        ContentInfo ci = new ContentInfo (asnNull);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to