Beispiel #1
0
        public async Task KeyMethods()
        {
            Assert.IsFalse(await _container.DeleteKey("not-exists"));
            Assert.IsFalse(await _container.KeyExists("not-exists"));
            var key = _container.GetKey <RedisItem <int> >("intkey");
            await key.Set(1);

            Assert.IsTrue(await _container.KeyExists("intkey"));
            Assert.IsTrue(await _container.DeleteKey(key.KeyName, false));
        }
Beispiel #2
0
 public async Task DeleteKey_And_KeyExists_WithNonExistantKey_ShouldReturnFalse()
 {
     Assert.False(await container.DeleteKey("not-exists"));
     Assert.False(await container.KeyExists("not-exists"));
 }