If I understand correctly, the SecretClient from Azure.Security.KeyVault.Certificates.nupkg is meant to replace KeyVaultClient from Microsoft.Azure.KeyVault.nupkg but it doesn't have an interface which makes it hard to mock using NSubstitute.
Working with KeyVaultClient was easy as I could simply do: Substitute.For<IKeyVaultClient>();
What is the guidance here? I don't want to have to create my own unit testable wrappers or use a different mocking framework.
EDIT I was able to do this:
var secretClient = Substitute.For<SecretClient>();
var page = Page<SecretProperties>.FromValues(new[] { new SecretProperties("SecretName") }, "continuationToken", null);
var pages = new List<Page<SecretProperties>> { page };
secretClient.GetPropertiesOfSecrets().Returns(Pageable<SecretProperties>.FromPages(pages));
secretClient.GetPropertiesOfSecrets().Dump();
secretClient.Received(1).GetPropertiesOfSecrets();