From 36b0cdd815346985542c4ddda23d61ebb5d00ed7 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Wed, 21 Aug 2024 11:36:05 -0400 Subject: [PATCH] chore: in-memory UpdateFlags to UpdateFlagsAsync (#298) I was doing an audit before the release and found this one method could use a suffix update. Signed-off-by: Todd Baert Signed-off-by: Artyom Tonoyan --- src/OpenFeature/Providers/Memory/InMemoryProvider.cs | 4 ++-- .../Providers/Memory/InMemoryProviderTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OpenFeature/Providers/Memory/InMemoryProvider.cs b/src/OpenFeature/Providers/Memory/InMemoryProvider.cs index 771e2210..3283ea22 100644 --- a/src/OpenFeature/Providers/Memory/InMemoryProvider.cs +++ b/src/OpenFeature/Providers/Memory/InMemoryProvider.cs @@ -43,10 +43,10 @@ public InMemoryProvider(IDictionary? flags = null) } /// - /// Updating provider flags configuration, replacing all flags. + /// Update provider flag configuration, replacing all flags. /// /// the flags to use instead of the previous flags. - public async Task UpdateFlags(IDictionary? flags = null) + public async Task UpdateFlagsAsync(IDictionary? flags = null) { var changed = this._flags.Keys.ToList(); if (flags == null) diff --git a/test/OpenFeature.Tests/Providers/Memory/InMemoryProviderTests.cs b/test/OpenFeature.Tests/Providers/Memory/InMemoryProviderTests.cs index 83974c23..c83ce0ce 100644 --- a/test/OpenFeature.Tests/Providers/Memory/InMemoryProviderTests.cs +++ b/test/OpenFeature.Tests/Providers/Memory/InMemoryProviderTests.cs @@ -170,7 +170,7 @@ public async Task GetString_ContextSensitive_ShouldEvaluateWithReasonAndVariant( public async Task EmptyFlags_ShouldWork() { var provider = new InMemoryProvider(); - await provider.UpdateFlags(); + await provider.UpdateFlagsAsync(); Assert.Equal("InMemory", provider.GetMetadata().Name); } @@ -216,7 +216,7 @@ public async Task PutConfiguration_shouldUpdateConfigAndRunHandlers() Assert.True(details.Value); // update flags - await provider.UpdateFlags(new Dictionary(){ + await provider.UpdateFlagsAsync(new Dictionary(){ { "new-flag", new Flag( variants: new Dictionary(){