コード例 #1
0
        public async void GetKeyStatusBeforeInit()
        {
            using (var client = new VaultClient(TestVaultAddress))
            {
                var ex = await Assert.ThrowsAsync <VaultClientException>(
                    async() => await client.GetKeyStatusAsync());

                Assert.Equal(HttpStatusCode.ServiceUnavailable, ex.StatusCode);
                Assert.Equal("Vault is sealed", ex.Errors?.Errors?.FirstOrDefault());
            }
        }