コード例 #1
0
        // [Fact]
        private void TestStoreWithSqlExceptionShouldReturnFalse()
        {
            AdoMetastorePersistenceImpl adoMetastorePersistenceImpl = new AdoMetastorePersistenceImpl(
                dbProviderFactory,
                fakeDbConnectionStringBuilder.ConnectionString);
            string keyId       = KeyStringWithParentKeyMetaKey;
            bool   actualValue = adoMetastorePersistenceImpl.Store(keyId, DateTimeOffset.UtcNow, new JObject());

            Assert.False(actualValue);
        }
コード例 #2
0
        private void TestStoreWithSqlException()
        {
            AdoMetastorePersistenceImpl adoMetastorePersistenceImpl = new AdoMetastorePersistenceImpl(
                dbProviderFactory,
                fakeDbConnectionStringBuilder.ConnectionString);
            string keyId = KeyStringWithParentKeyMetaKey;

            Assert.Throws <AppEncryptionException>(() =>
                                                   adoMetastorePersistenceImpl.Store(keyId, DateTimeOffset.UtcNow, new JObject()));
        }