Skip to content

Commit

Permalink
update KeyvaultSettings and tests
Browse files Browse the repository at this point in the history
Related to: aliencube#300
  • Loading branch information
sikutisa committed Sep 7, 2024
1 parent 5cc0d0e commit f57decc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ public class KeyVaultSettings
/// <summary>
/// Gets or sets the secret names.
/// </summary>
public IDictionary<string, string> SecretNames { get; set; } = new Dictionary<string, string>();
public Dictionary<string, string> SecretNames { get; set; } = new();
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void Given_NullOrEmpty_VaultUri_When_Invoked_AddKeyVaultService_Then_It_S
var dict = new Dictionary<string, string>()
{
{ "Azure:KeyVault:VaultUri", vaultUri! },
{ "Azure:KeyVault:SecretName", secretName },
{ "Azure:KeyVault:SecretNames:OpenAI", secretName },
};
#pragma warning disable CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types.
var config = new ConfigurationBuilder().AddInMemoryCollection(dict).Build();
Expand All @@ -117,7 +117,7 @@ public void Given_NullOrEmpty_SecretName_When_Invoked_AddKeyVaultService_Then_It
var dict = new Dictionary<string, string>()
{
{ "Azure:KeyVault:VaultUri", vaultUri },
{ "Azure:KeyVault:SecretName", secretName! },
{ "Azure:KeyVault:SecretNames:OpenAI", secretName! },
};
#pragma warning disable CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types.
var config = new ConfigurationBuilder().AddInMemoryCollection(dict).Build();
Expand All @@ -141,7 +141,7 @@ public void Given_Invalid_VaultUri_When_Invoked_AddKeyVaultService_Then_It_Shoul
var dict = new Dictionary<string, string>()
{
{ "Azure:KeyVault:VaultUri", vaultUri },
{ "Azure:KeyVault:SecretName", secretName },
{ "Azure:KeyVault:SecretNames:OpenAI", secretName },
};
#pragma warning disable CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types.
var config = new ConfigurationBuilder().AddInMemoryCollection(dict).Build();
Expand All @@ -165,7 +165,7 @@ public void Given_AppSettings_When_Invoked_AddKeyVaultService_Then_It_Should_Ret
var dict = new Dictionary<string, string>()
{
{ "Azure:KeyVault:VaultUri", vaultUri },
{ "Azure:KeyVault:SecretName", secretName },
{ "Azure:KeyVault:SecretNames:OpenAI", secretName },
};
#pragma warning disable CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types.
var config = new ConfigurationBuilder().AddInMemoryCollection(dict).Build();
Expand All @@ -190,7 +190,7 @@ public void Given_AppSettings_When_Invoked_AddKeyVaultService_Then_It_Should_Ret
var dict = new Dictionary<string, string>()
{
{ "Azure:KeyVault:VaultUri", vaultUri },
{ "Azure:KeyVault:SecretName", secretName },
{ "Azure:KeyVault:SecretNames:OpenAI", secretName },
};
#pragma warning disable CS8620 // Argument cannot be used for parameter due to differences in the nullability of reference types.
var config = new ConfigurationBuilder().AddInMemoryCollection(dict).Build();
Expand Down

0 comments on commit f57decc

Please sign in to comment.