feat: implement delete async method on json storage provider

This commit is contained in:
Stevan Freeborn
2026-03-29 21:14:37 -05:00
parent a8774aefe6
commit 8453381fe0
2 changed files with 35 additions and 11 deletions
@@ -58,6 +58,18 @@ public class JsonFileStorageProviderTests : IDisposable
});
}
[Fact]
public async Task DeleteAsync_WhenCalled_ItShouldRemoveKey()
{
await _sut.WriteAsync("KeyToDelete", "SomeValue");
var deleteResult = await _sut.DeleteAsync("KeyToDelete");
var readResult = await _sut.ReadAsync("KeyToDelete");
deleteResult.Should().BeTrue();
readResult.Should().BeEmpty();
}
public void Dispose()
{
if (Directory.Exists(_tmpDirectory))
@@ -67,4 +79,4 @@ public class JsonFileStorageProviderTests : IDisposable
GC.SuppressFinalize(this);
}
}
}