feat: implement delete async method on json storage provider
This commit is contained in:
+13
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user