public void Should_support_index_retrieval_of_items() { IObjectCache<Guid, Data> cache = new InMemoryObjectCache<Guid, Data>(); var data = new Data(); cache.TryAdd(data.Identifier, data); Assert.IsTrue(cache.Contains(data.Identifier)); }
public void Should_support_index_retrieval_of_items() { IObjectCache <Guid, Data> cache = new InMemoryObjectCache <Guid, Data>(); var data = new Data(); cache.TryAdd(data.Identifier, data); Assert.IsTrue(cache.Contains(data.Identifier)); }
public void Should_support_index_creation() { IObjectCache<Guid, Data> cache = new InMemoryObjectCache<Guid, Data>(); var data = new Data(); cache.TryAdd(data.Identifier, data); IReadOnlyObjectIndex<string, Data> index = cache.GetIndex(x => x.Value); Assert.IsTrue(index.Contains(data.Value)); }
public void Should_support_index_creation() { IObjectCache <Guid, Data> cache = new InMemoryObjectCache <Guid, Data>(); var data = new Data(); cache.TryAdd(data.Identifier, data); IReadOnlyObjectIndex <string, Data> index = cache.GetIndex(x => x.Value); Assert.IsTrue(index.Contains(data.Value)); }