From 1880c25e7f2d216bd9be13ed9b32ef77d26d28fc Mon Sep 17 00:00:00 2001 From: AnthonyNjuguna Date: Fri, 2 Feb 2024 12:27:24 +0000 Subject: [PATCH] Update SecureStorage_Tests.cs Update SecureStorage_Tests.cs --- .../DeviceTests/Tests/SecureStorage_Tests.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Essentials/test/DeviceTests/Tests/SecureStorage_Tests.cs b/src/Essentials/test/DeviceTests/Tests/SecureStorage_Tests.cs index fc229aa6aec9..7d697e228769 100644 --- a/src/Essentials/test/DeviceTests/Tests/SecureStorage_Tests.cs +++ b/src/Essentials/test/DeviceTests/Tests/SecureStorage_Tests.cs @@ -223,5 +223,25 @@ await Parallel.ForEachAsync(Enumerable.Range(0, 100), async (i, _) => Assert.Null(fetched); }); } + + [Theory +#if MACCATALYST + (Skip = "Need to configure entitlements.") +#endif + ] + [InlineData("test.txt", "data")] + public async Task Set_RemoveAll_Set_Get(string key, string data) + { + await SecureStorage.SetAsync(key, data); + + // Remove all + SecureStorage.RemoveAll(); + + //Set again + await SecureStorage.SetAsync(key, data); + var c = await SecureStorage.GetAsync(key); + + Assert.Equal(data, c); + } } }