Skip to content

Commit

Permalink
Update SecureStorage_Tests.cs
Browse files Browse the repository at this point in the history
Update SecureStorage_Tests.cs
  • Loading branch information
AnthonyNjuguna committed Feb 2, 2024
1 parent 8b150ab commit 1880c25
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Essentials/test/DeviceTests/Tests/SecureStorage_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 1880c25

Please sign in to comment.