Skip to content

Commit

Permalink
test: add test for (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
catcherwong committed Oct 6, 2021
1 parent 6850599 commit b85398c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/EasyCaching.UnitTests/CachingTests/HybridCachingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,22 @@ public async Task Distributed_Set_Async_Throw_Exception_Should_Not_Break()
Assert.Equal(default(string), res.Value);
}

[Fact]
public void Iss_311_Test()
{
var cacheKey = $"{_namespace}_iss311_{Guid.NewGuid()}";

hybridCaching_1.Set(cacheKey, "val", TimeSpan.FromSeconds(30));

var afterSet = hybridCaching_1.Exists(cacheKey);
Assert.True(afterSet);

hybridCaching_1.Remove(cacheKey);

var afterRemove = hybridCaching_1.Exists(cacheKey);
Assert.False(afterRemove);
}

private void FakeCreatProvider()
{
A.CallTo(() => fakeFactory.GetCachingProvider("m1")).Returns(new FakeLocalCachingProvider());
Expand Down

0 comments on commit b85398c

Please sign in to comment.