public void DistributedDictionaryAllowsRemovingEntries() { var storage = new RedisStorage(Host); var id = Guid.NewGuid().ToString(); var dictionary = new Bluepath.Storage.Structures.Collections.DistributedDictionary<int, string>(storage, id); dictionary.Add(0, "ala"); dictionary.Add(2, "ola"); dictionary.Add(18, "zuza"); dictionary.ContainsKey(2).ShouldBe(true); dictionary.Remove(2); dictionary.ContainsKey(2).ShouldBe(false); }
public void DistributedDictionaryProperlyManagesKeysCollection() { var storage = new RedisStorage(Host); var id = Guid.NewGuid().ToString(); var dictionary = new Bluepath.Storage.Structures.Collections.DistributedDictionary<int, string>(storage, id); dictionary.Add(0, "ala"); dictionary.Add(2, "ola"); dictionary.Add(18, "zuza"); dictionary.ContainsKey(2).ShouldBe(true); dictionary.Keys.Count.ShouldBe(3); }