Example #1
0
 public void ExceptionDuringEncryptCallsInstrumentationProvider()
 {
     try
     {
         SymmetricProviderHelper helper = CreateHelper(DataProtectionScope.CurrentUser, null);
         helper.EncryptNull();
     }
     catch (ArgumentNullException)
     {
         Assert.AreEqual(0, instrumentationProvider.FireEncryptionPerformedCallCount);
         Assert.AreEqual(1, instrumentationProvider.FireCryptoFailedCallCount);
         Assert.AreEqual("The encryption operation failed.", instrumentationProvider.lastCryptoFailedMessage);
     }
 }
Example #2
0
        public void EncryptNullThrows()
        {
            SymmetricProviderHelper helper = CreateHelper(DataProtectionScope.CurrentUser, null);

            helper.EncryptNull();
        }