public void Delete_NoPurge_AddCertificateToDeletedCertificates() { var deleteLogger = _loggerFactory.CreateLogger <KeyVaultCertificateDeleter>(); var addLogger = _loggerFactory.CreateLogger <KeyVaultCertificateAdder>(); var adder = new KeyVaultCertificateAdder(_client, addLogger); adder.Add(_certificateName); var deleter = new KeyVaultCertificateDeleter(_client, deleteLogger); deleter.Delete(new KeyVaultCertificateDeleteEvent { Name = _certificateName }); _client.GetDeletedCertificate(_certificateName).Value.Should().NotBeNull(); }
private bool WaitForDeletedCertificate(CertificateClient client, string certName) { int maxIterations = 20; for (int i = 0; i < maxIterations; i++) { try { client.GetDeletedCertificate(certName); return(true); } catch { Thread.Sleep(5000); } } return(false); }