public void AddSecretMethodSadPath() { var source = new SecretsConfigurationSource(); var builder = new SecretsConfigurationBuilder(source); Action act = () => builder.AddSecret(null); act.Should().ThrowExactly <ArgumentNullException>().WithMessage("*secret*"); }
public void AddSecretMethodHappyPath() { var source = new SecretsConfigurationSource(); var builder = new SecretsConfigurationBuilder(source); var secret = MockSecret.Get("foo", "bar").Object; builder.AddSecret(secret); source.Secrets.Should().ContainSingle() .Which.Should().BeSameAs(secret); }