2 // AsymmetricEncryptionKeyTest.cs
3 // - NUnit Test Cases for AsymmetricEncryptionKey
6 // Sebastien Pouliot (spouliot@motus.com)
8 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
11 using NUnit
.Framework
;
12 using Microsoft
.Web
.Services
.Security
;
14 using System
.Security
.Cryptography
;
17 namespace MonoTests
.MS
.Web
.Services
.Security
{
20 public class AsymmetricEncryptionKeyTest
: Assertion
{
23 [ExpectedException (typeof (ArgumentNullException
))]
24 public void ConstructorNull ()
26 AsymmetricEncryptionKey aek
= new AsymmetricEncryptionKey (null);
30 public void ConstructorDSA ()
32 DSA dsa
= DSA
.Create ();
33 dsa
.ImportParameters (AllTests
.GetDSAKey (false));
34 AsymmetricEncryptionKey aek
= new AsymmetricEncryptionKey (dsa
);
35 AssertNotNull("DSA-KeyInfo", aek
.KeyInfo
);
39 public void ConstructorRSA ()
41 RSA rsa
= RSA
.Create ();
42 rsa
.ImportParameters (AllTests
.GetRSAKey (false));
43 AsymmetricEncryptionKey aek
= new AsymmetricEncryptionKey (rsa
);
44 AssertNotNull ("RSA-KeyInfo", aek
.KeyInfo
);