Exemplo n.º 1
0
        public void RemoveTest()
        {
            var storage = new InMemoryStorage();
            var item    = new ReminderItem(Guid.NewGuid(), DateTimeOffset.Now, "Test ALO", 0);

            storage.Add(item.Id, item);
            storage.Remove(item.Id);
            var count = storage.GetList().Count;

            Assert.AreEqual(count, 0);
        }
Exemplo n.º 2
0
        public void RemoveTest()
        {
            var memoryStorage = new InMemoryStorage();
            var item          = new ReminderItem();
            var id            = Guid.NewGuid();

            memoryStorage.Add(id, item);

            Assert.AreEqual(memoryStorage.Count(), 1);

            memoryStorage.Remove(id);

            Assert.AreEqual(memoryStorage.Count(), 0);
        }
 private void RemoveInMemoryCacheEntry(object key, string stateKey)
 {
     // remove in memory cache if entry exist
     InMemoryStorage.Remove(_owner.Analyzer, (key, stateKey));
 }