mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 08:55:28 +08:00 
			
		
		
		
	##591 added addanddelete method back to cache as Ocelot.Provider.Consul uses it...sigh at me (#592)
This commit is contained in:
		@@ -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()
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user