Ejemplo n.º 1
0
 public void X509CertUtilityDecryptNoCertTest()
 {
     byte[] encoded = Encoding.UTF8.GetBytes("doesntmatterwhatthisis");
     Assert.ThrowsException <ArgumentNullException>(() => X509CertificateUtility.Decrypt(encoded, null));
 }
Ejemplo n.º 2
0
        public void X509CertUtilityDecryptNothingTest()
        {
            var certificate = X509CertificateUtility.LoadCertificate(StoreName.My, StoreLocation.CurrentUser, TestCommon.GetX509CertificateThumbprint());

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