/// <summary>
        /// Creates a new instance of the <see cref="SecretsFixture"/> class.
        /// </summary>
        public SecretsFixture()
        {
            SecretClientOptions options = new SecretClientOptions
            {
                Diagnostics =
                {
                    IsLoggingContentEnabled = true,
                },
                Transport = new MockTransport(CreateResponse),
            };

            options.AddPolicy(_proxy = new KeyVaultProxy(), HttpPipelinePosition.PerCall);
            _originalTtl             = _proxy.Ttl;

            Client = new SecretClient(new Uri("https://test.vault.azure.net"), new NullCredential(), options);
        }
Beispiel #2
0
 public void IsSupported(string uri, bool expected) => Assert.Equal(expected, KeyVaultProxy.IsSupported(uri));
Beispiel #3
0
        public void DefaultTtl()
        {
            KeyVaultProxy proxy = new KeyVaultProxy();

            Assert.Equal(TimeSpan.FromHours(1), proxy.Ttl);
        }