##591 added addanddelete method back to cache as Ocelot.Provider.Consul uses it...sigh at me (#592)

This commit is contained in:
Tom Pallister
2018-09-03 07:58:22 +01:00
committed by GitHub
parent 66b68fc685
commit 6198404697
3 changed files with 34 additions and 11 deletions

View File

@ -25,6 +25,18 @@
fake.Value.ShouldBe(1);
}
[Fact]
public void should_add_and_delete()
{
var fake = new Fake(1);
_cache.Add("1", fake, TimeSpan.FromSeconds(100), "region");
var newFake = new Fake(1);
_cache.AddAndDelete("1", newFake, TimeSpan.FromSeconds(100), "region");
var result = _cache.Get("1", "region");
result.ShouldBe(newFake);
newFake.Value.ShouldBe(1);
}
[Fact]
public void should_clear_region()
{