RecipientInfoTest.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // RecipientInfoTest.cs - NUnit tests for RecipientInfo
  3. //
  4. // Author:
  5. // Sebastien Pouliot ([email protected])
  6. //
  7. // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
  8. //
  9. #if NET_1_2
  10. using NUnit.Framework;
  11. using System;
  12. using System.Collections;
  13. using System.Security.Cryptography;
  14. using System.Security.Cryptography.Pkcs;
  15. namespace MonoTests.System.Security.Cryptography.Pkcs {
  16. // RecipientInfo is an abstract class so this is a concrete implementation
  17. // to test the (non abstract) constructor and Type property
  18. public class UTestRecipientInfo : RecipientInfo {
  19. public UTestRecipientInfo () : base () {}
  20. // properties
  21. public override byte[] EncryptedKey {
  22. get { return null; }
  23. }
  24. public override AlgorithmIdentifier KeyEncryptionAlgorithm {
  25. get { return null; }
  26. }
  27. public override SubjectIdentifier RecipientIdentifier {
  28. get { return null; }
  29. }
  30. public override int Version {
  31. get { return 0; }
  32. }
  33. }
  34. [TestFixture]
  35. public class RecipientInfoTest : Assertion {
  36. [Test]
  37. public void Type ()
  38. {
  39. UTestRecipientInfo ri = new UTestRecipientInfo ();
  40. AssertEquals ("Type", RecipientInfoType.Unknown, ri.Type);
  41. }
  42. }
  43. }
  44. #endif