public void GetAll_Objects_By_Keys() { int count = 10; List <string> keys = new List <string>(); for (int i = 0; i < count; i++) { keys.Add($"key{i}"); cache.Set($"key{i}", $"value {i}", null); } var list = cache.GetAll(keys).ToList(); Assert.AreEqual(list.Count, count); list.Sort((x, y) => x.Key.CompareTo(y.Key)); for (int i = 0; i < count; i++) { Assert.IsTrue(list[i].Key == $"key{i}" && list[i].Value.ToString() == $"value {i}"); } }
public IEnumerable <KeyValuePair <string, object> > GetAll(IEnumerable <string> keys) { return(innerCache.GetAll(keys)); }