Пример #1
0
 public void X509CertUtilityEncryptNoCertTest()
 {
     byte[] encoded = Encoding.UTF8.GetBytes("test");
     Assert.ThrowsException <ArgumentNullException>(() => X509CertificateUtility.Encrypt(encoded, null));
 }
Пример #2
0
        public void X509CertUtilityEncryptNothingTest()
        {
            var certificate = X509CertificateUtility.LoadCertificate(StoreName.My, StoreLocation.CurrentUser, TestCommon.GetX509CertificateThumbprint());

            Assert.ThrowsException <ArgumentNullException>(() => X509CertificateUtility.Encrypt(null, certificate));
        }