public void Should_ThrowArgumentNullException_When_ProjectIdIsNull() { var options = new SecretManagerConfigurationOptions(); var configurationSource = new SecretManagerConfigurationSource(options, _mockServiceClientHelper.Object); Assert.Throws <ArgumentNullException>(() => configurationSource.Build(_mockConfigurationBuilder.Object)); }
public void Should_CreateProviderWithoutCredentialPath_When_CredentialsPathIsNull() { _mockServiceClientHelper.Setup(x => x.Create()).Returns <SecretManagerServiceClient>(null); var options = new SecretManagerConfigurationOptions { ProjectId = "ProjectId" }; var configurationSource = new SecretManagerConfigurationSource(options, _mockServiceClientHelper.Object); var provider = configurationSource.Build(_mockConfigurationBuilder.Object); _mockServiceClientHelper.Verify(x => x.Create(), Times.Once); }