2008-11-01 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Sun, 2 Nov 2008 00:18:43 +0000 (00:18 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Sun, 2 Nov 2008 00:18:43 +0000 (00:18 -0000)
* CmsRecipientCollectionTest.cs: Verify NRE behavior of ctor.

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

mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ChangeLog
mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs [new file with mode: 0644]

index 82b90bb87890421d8bd7a0cbc104f48764987bd2..81e50eb39c08debcad356ddc8c42233a345ce2f9 100644 (file)
@@ -1,3 +1,7 @@
+2008-11-01  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * CmsRecipientCollectionTest.cs: Verify NRE behavior of ctor.
+
 2006-12-15  Sebastien Pouliot  <sebastien@ximian.com>
 
        * PkitsTest.cs: New. Common test code to use the PKITS test data.
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs
new file mode 100644 (file)
index 0000000..bc669bb
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// Unit tests for CmsRecipientCollection
+//
+// Author:
+//     Sebastien Pouliot  <sebastien@ximian.com>
+//
+// Copyright (C) 2008 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using NUnit.Framework;
+
+using System;
+using System.Security.Cryptography.Pkcs;
+
+namespace MonoTests.System.Security.Cryptography.Pkcs {
+
+       [TestFixture]
+       public class CmsRecipientCollectionTest {
+
+               [Test]
+               [ExpectedException (typeof (NullReferenceException))]
+               public void Ctor_SubjectIdentifierType_X509Certificate2CollectionNull ()
+               {
+                       new CmsRecipientCollection (SubjectIdentifierType.NoSignature, null);
+               }
+       }
+}
+
+#endif