コード例 #1
0
        public void GetEffectiveEncryptionKey_Invalid(EncryptionKey clientkey, EncryptionKey operationKey, string kmsKey, string expectedMessageSubstring)
        {
            var service   = new StorageService();
            var client    = new StorageClientImpl(service, clientkey);
            var exception = Assert.Throws <ArgumentException>(() => client.GetEffectiveEncryptionKey(operationKey, kmsKey));

            Assert.Contains(expectedMessageSubstring, exception.Message);
        }
コード例 #2
0
        public void GetEffectiveEncryptionKey_Valid(EncryptionKey clientkey, EncryptionKey operationKey, string kmsKey, EncryptionKey expected)
        {
            var service = new StorageService();
            var client  = new StorageClientImpl(service, clientkey);
            var actual  = client.GetEffectiveEncryptionKey(operationKey, kmsKey);

            Assert.Same(expected, actual);
        }